Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] 수강 신청,마이 페이지 관련 QA 반영 #84

Merged
merged 12 commits into from
Aug 31, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const MyInfoBox = async () => {
</Flex>
<Space height={58} />
<Flex gap="xs">
<Link href={routePath["onboarding"]} target="_blank">
<Link href={routePath["onboardingDashboard"]} target="_blank">
<Button size="sm" variant="outline">
계정 정보
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const StudyApplication = ({ params }: { params: { studyId: number } }) => {
const studyId = params.studyId;

const [applySuccess, setApplySuccess] = useState(false);
const [isLoading, setIsLoading] = useState(true);
const [studyTitle, setStudyTitle] = useState("");

useEffect(() => {
Expand All @@ -27,6 +28,7 @@ const StudyApplication = ({ params }: { params: { studyId: number } }) => {
if (selectedStudy) {
setStudyTitle(selectedStudy.title);
}
setIsLoading(false);
};

fetchStudyData();
Expand All @@ -41,6 +43,10 @@ const StudyApplication = ({ params }: { params: { studyId: number } }) => {
}
};

if (isLoading) {
return null;
}

return (
<Modal>
<Flex direction="column" textAlign="center" width="21rem">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import Button from "wowds-ui/Button";
const StudyCancel = ({ params }: { params: { studyId: number } }) => {
const studyId = params.studyId;
const [cancelSucces, setCancelSuccess] = useState(false);
const [isLoading, setIsLoading] = useState(true);
const [studyTitle, setStudyTitle] = useState("");

useEffect(() => {
Expand All @@ -26,6 +27,7 @@ const StudyCancel = ({ params }: { params: { studyId: number } }) => {
if (selectedStudy) {
setStudyTitle(selectedStudy.title);
}
setIsLoading(false);
};

fetchStudyData();
Expand All @@ -41,6 +43,10 @@ const StudyCancel = ({ params }: { params: { studyId: number } }) => {
}
};

if (isLoading) {
return null;
}

return (
<Modal>
<Flex direction="column" textAlign="center" width="21rem">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,27 @@ const StudyItem = ({ study, appliedStudyId }: StudyItemProps) => {
const isCancelable = appliedStudyId === studyId;
const isNotApplicable = !isApplicable && !isCancelable;
return (
<Table>
<Table className={tableStyle}>
<Flex direction="column" gap="xxs" justifyContent="center" width={334}>
<Flex className={contentStyle} gap="xs">
<Text typo="h3">{title}</Text>
<Text className={titleStyle} typo="h3">
{title}
</Text>
<Tag color={sessionColors[studyType] ?? "green"} variant="solid1">
{studyType}
</Tag>
</Flex>
<Link href={notionLink ?? ""} target="_blank">
<Text className={introductionLinkTextStyle} color="sub" typo="body2">
{`(${introduction})`}
</Text>
</Link>
{introduction && (
<Link href={notionLink ?? ""} target="_blank">
<Text
className={introductionLinkTextStyle}
color="sub"
typo="body2"
>
{`(${introduction})`}
</Text>
</Link>
)}
</Flex>
<Text className={textCellStyle}>{mentorName}</Text>
<Text
Expand All @@ -72,7 +80,7 @@ const StudyItem = ({ study, appliedStudyId }: StudyItemProps) => {
</Text>
<Text className={textCellStyle}>{totalWeek}주 코스</Text>
<Flex direction="column" textAlign="center">
<Text className={textCellStyle}>
<Text className={dateStyle}>
{`${openingDate.month}.${openingDate.day} 개강`}
</Text>
{isCancelable && (
Expand Down Expand Up @@ -106,6 +114,21 @@ const StudyItem = ({ study, appliedStudyId }: StudyItemProps) => {
);
};

const tableStyle = css({
justifyContent: "unset",
});

const titleStyle = css({
textOverflow: "ellipsis",
overflow: "hidden",
maxWidth: "210px",
whiteSpace: "nowrap",
});

const dateStyle = css({
width: "118px",
});

const textCellStyle = css({
paddingX: "28px",
});
Expand All @@ -118,6 +141,7 @@ const introductionLinkTextStyle = css({
whiteSpace: "nowrap",
overflow: "hidden",
textOverflow: "ellipsis",
textDecoration: "underline",
});

const sessionColors: Record<StudyType, ComponentProps<typeof Tag>["color"]> = {
Expand Down
1 change: 1 addition & 0 deletions apps/client/constants/routePath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const routePath = {
["my-page"]: "/my-page",
["my-page-logout"]: "/my-page/logout",
onboarding: "https://onboarding.gdschongik.com",
onboardingDashboard: "https://onboarding.gdschongik.com/dashboard",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p3;
근데 어차피 온보딩 대시보드 링크 외부 링크로 열어줘서 로그인 다시 해야하는 상황이라 위 onboarding routePath랑 동일할 거 같은데 구분하지 않아도 괜찮을 거 같아요

Copy link
Collaborator Author

@SeieunYoo SeieunYoo Aug 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

계정 정보 QA에 관해서는 아직 논의 중이라고 하셔서 다시 원복 해둘게요! 스레드

github: "https://github.com",
admin:
process.env.NODE_ENV === "production"
Expand Down
4 changes: 2 additions & 2 deletions apps/client/types/dtos/applyStudy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ export interface StudyList {
studyId: number;
title: string;
studyType: StudyType;
notionLink: string;
introduction: string;
notionLink?: string;
introduction?: string;
mentorName: string;
dayOfWeek: DayOfWeekType;
startTime: Time | null;
Expand Down
845 changes: 844 additions & 1 deletion packages/ui/src/styles.css

Large diffs are not rendered by default.

Loading