Skip to content

Commit 263e9ed

Browse files
manNomi한만욱
andauthored
Fix/build (#205)
* fix : conflict 버전 충돌문제 해결했습니다 * fix : enum으로 수정한 부분 되돌렸습니다 * fix : null값 접근하지 않도록 수정했습니다 --------- Co-authored-by: 한만욱 <manwook-han@hanman-ug-ui-MacBookPro.local>
1 parent fef3703 commit 263e9ed

File tree

2 files changed

+38
-34
lines changed

2 files changed

+38
-34
lines changed

src/app/mentor/modify/_ui/ModifyContent/index.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ import { zodResolver } from "@hookform/resolvers/zod";
2222

2323
const ModifyContent = () => {
2424
const { myMentorProfile } = useGetMyMentorProfile();
25-
const { articleList } = useGetArticleList(myMentorProfile.id);
2625

27-
const { profileImageUrl, hasBadge, menteeCount, nickname, country, universityName, studyStatus } = myMentorProfile;
26+
const myId = myMentorProfile?.id || 0;
27+
const { articleList } = useGetArticleList(myId);
2828

2929
const {
3030
register,
@@ -52,6 +52,10 @@ const ModifyContent = () => {
5252
putMyMentorProfile(payload);
5353
};
5454

55+
56+
if (!myMentorProfile) return null; // myMentorProfile가 없으면 아무것도 렌더링하지 않음
57+
const { profileImageUrl, hasBadge, menteeCount, nickname, country, universityName, studyStatus } = myMentorProfile;
58+
5559
return (
5660
<div className="px-5">
5761
<form onSubmit={handleSubmit(onSubmit)}>

src/constants/application.ts

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
export enum LanguageTest {
2-
TOEIC = "toeic",
3-
TOEFL_IBT = "toefl ibt",
4-
TOEFL_ITP = "toefl itp",
5-
NEW_HSK = "new hsk",
6-
IELTS = "ielts",
7-
JLPT = "jlpt",
8-
OTHER = "other",
9-
}
1+
export const LANGUAGE_TEST = {
2+
TOEIC: "toeic",
3+
TOEFL_IBT: "toefl ibt",
4+
TOEFL_ITP: "toefl itp",
5+
NEW_HSK: "new hsk",
6+
IELTS: "ielts",
7+
JLPT: "jlpt",
8+
OTHER: "other",
9+
};
1010

11-
export enum LanguageTestConverse {
12-
TOEIC = "TOEIC",
13-
IBT = "TOEFL_IBT",
14-
ITP = "TOEFL_ITP",
15-
IELTS = "IELTS",
16-
JLPT = "JLPT",
17-
OTHERS = "DUOLINGO",
18-
}
11+
export const LANGUAGE_TEST_CONVERSE = {
12+
toeic: "TOEIC",
13+
ibt: "TOEFL_IBT",
14+
itp: "TOEFL_ITP",
15+
ielts: "IELTS",
16+
jlpt: "JLPT",
17+
others: "DUOLINGO",
18+
};
1919

20-
export enum LanguageTestInverse {
21-
TOEIC = "TOEIC",
22-
TOEFL_IBT = "TOEFL IBT",
23-
TOEFL_ITP = "TOEFL ITP",
24-
IELTS = "IELTS",
25-
JLPT = "JLPT",
26-
}
20+
export const LANGUAGE_TEST_INVERSE = {
21+
TOEIC: "TOEIC",
22+
"TOEFL IBT": "TOEFL_IBT",
23+
"TOEFL ITP": "TOEFL_ITP",
24+
IELTS: "IELTS",
25+
JLPT: "JLPT",
26+
};
2727

28-
export enum ShortLanguageTest {
29-
TOEIC = "TOEIC",
30-
TOEFL_IBT = "IBT",
31-
TOEFL_ITP = "ITP",
32-
IELTS = "IELTS",
33-
JLPT = "JLPT",
34-
OTHER = "기타",
35-
}
28+
export const SHORT_LANGUAGE_TEST = {
29+
TOEIC: "TOEIC",
30+
TOEFL_IBT: "IBT",
31+
TOEFL_ITP: "ITP",
32+
IELTS: "IELTS",
33+
JLPT: "JLPT",
34+
OTHER: "기타",
35+
};

0 commit comments

Comments
 (0)