-
Notifications
You must be signed in to change notification settings - Fork 1
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
refactor: my page refactor #139
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- ๋ง์ ์์ ์ด ์ด๋ค์ก๋ค์! ์๊ณ ๋ง์ผ์ จ์ต๋๋ค.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํ์ผ ์ด๋ฆ์ ์ผ๋ฐฅ ์ผ์ด์ค๋ก ๋ณ๊ฒฝํ๋๊ฒ ์ข๊ฒ ์ต๋๋ค
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์์ ํ์ต๋๋ค!
f8b52be
const processChapel = (takenLectures: TakenLectureInfoResponse[]) => { | ||
return takenLectures.map((lecture) => { | ||
return { | ||
id: lecture.id, | ||
year: lecture.year, | ||
semester: lecture.semester, | ||
lectureCode: lecture.lectureCode, | ||
lectureName: lecture.lectureName, | ||
credit: lecture.lectureName === '์ฑํ' ? 0.5 : lecture.credit, | ||
}; | ||
}); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
credit ์ธ ์์ฑ์ ๋ชจ๋ ๊ทธ๋๋ก ์ฌ์ฉํ๋, ๊ตฌ์กฐ ๋ถํด ํ ๋น์ ์ฌ์ฉํ๋ฉด ์ฝ๋๊ฐ ๋ ๋ณด๊ธฐ ํธํ ๊ฒ ๊ฐ์์.
const processChapel = (takenLectures: TakenLectureInfoResponse[]) => { | |
return takenLectures.map((lecture) => { | |
return { | |
id: lecture.id, | |
year: lecture.year, | |
semester: lecture.semester, | |
lectureCode: lecture.lectureCode, | |
lectureName: lecture.lectureName, | |
credit: lecture.lectureName === '์ฑํ' ? 0.5 : lecture.credit, | |
}; | |
}); | |
}; | |
const processChapel = (takenLectures: TakenLectureInfoResponse[]) => { | |
return takenLectures.map((lecture) => { | |
return { | |
...lecture, | |
credit: lecture.lectureName === '์ฑํ' ? 0.5 : lecture.credit, | |
}; | |
}); | |
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์๋ ค์ฃผ์
์ ๊ฐ์ฌํฉ๋๋ค
f0c4e62
toast({ | ||
title: '๊ณผ๋ชฉ ์ญ์ ์ ์ฑ๊ณตํ์ต๋๋ค', | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๊ณผ๋ชฉ์ ์ฌ๋ฌ ๊ฐ ์ญ์ ํ๋ฉด ์ด๋ค ๊ณผ๋ชฉ์ด ์ญ์ ๋์๋์ง ํ์ธํ๊ธฐ ์ด๋ ค์ธ ๊ฒ ๊ฐ์์ lectureName์ด๋ ์ฝ๋ ์ ๋ณด๋ฅผ ID๋ก ๊ฐ์ ธ์ค๋ ๊ฒ์ด ์ด๋ ต์ง ์๋ค๋ฉด, ํ ์คํธ ๋ฉ์์ง์ ์ถ๊ฐํ๋ ๊ฒ๋ ์ข์๋ณด์ฌ์.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f0c4e62
๊ธฐ์กด delete logic์ ์์ ํจ์ผ๋ก์จ ํด๊ฒฐํ์ต๋๋ค
์ด์ ์ lecture ์ปดํฌ๋ํธ ๊ด๋ จํด์ ์ด๋ป๊ฒ ๊ตฌํํ ์ง ๊ณ ๋ฏผ์ ๋ง์ด ํ์ด์ ๊ทธ๋ฐ์ง ๊ฐ๋จํ๊ฒ ์์ ํ ์ ์์์ต๋๋ค-!
<> | ||
<Form | ||
id="๋ก๊ทธ์ธ" | ||
className="space-y-6" | ||
action={authenticate} | ||
onSuccess={(formState) => { | ||
if (formState?.message === '์ฌ์ ๋ก๋') open(); | ||
}} | ||
> | ||
<Form.TextInput required={true} label="์์ด๋" id="authId" placeholder="์์ด๋๋ฅผ ์ ๋ ฅํ์ธ์" /> | ||
<Form.PasswordInput required={true} label="๋น๋ฐ๋ฒํธ" id="password" placeholder="๋น๋ฐ๋ฒํธ๋ฅผ ์ ๋ ฅํ์ธ์" /> | ||
<div className="pt-6"> | ||
<Form.SubmitButton label="๋ก๊ทธ์ธ" position="center" variant="primary" /> | ||
</div> | ||
</Form> | ||
<UpdateInstruction /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- useDialog ํ ์ ์ ํธ ํ ์ด๋ฏ๋ก ๊ณ์ธต๊ณผ ์๊ด์์ด ์ฌ์ฉํ ์ ์์ต๋๋ค. ์ ์๊ฐ์๋ UpdateInstriction ์ปดํฌ๋ํธ๊ฐ ์ด ์์น์ ์์ ํ์๋ ์๋ค๊ณ ๋ด ๋๋ค. ํ์ด์ง ์์ค์ ์์น์์ผ๋ useDialog๋ก ์ผ๊ณ ๋ซ์ ์ ์์ผ๋, ํ์ด์ง ์ปดํฌ๋ํธ๋ก ์ฌ๋ ค๋ ๊ด์ฐฎ๋ค๊ณ ์๊ฐํด์.
- ๋ ๋ค๋ฅธ ๋ฐฉ๋ฒ์ด์ ๊ฐ์ฅ ์ข๋ค๊ณ ์๊ฐํ๋ ๋ฐฉ๋ฒ์, Sign-in-form ์ปดํฌ๋ํธ๊ฐ ์ฑ๊ณต ์ ์๋ํ๋ props๋ฅผ ๋ฐ๊ณ ํธ์ถํ๋ ๊ฒ๋๋ค. ๊ทธ๋ฆฌ๊ณ ํ์ด์ง ์ปดํฌ๋ํธ์์ dialog๋ฅผ ์ฌ๋ open ํจ์๋ฅผ ํธ๋ค๋ฌ๋ก ๋๊ฒจ์ฃผ๋ ๊ฑฐ์ฃ . ์ด๋ ๊ฒ ํ๋ฉด Sign-in-form ์ปดํฌ๋ํธ๋ ์ฌ์ ๋ก๋ dialog์ ๋ํด ๋ชจ๋ฅด๊ณ , ํ์ด์ง ์์ค์์ ์ ๋ถ ์ฒ๋ฆฌํ ์ ์์ ๊ฒ ๊ฐ์ต๋๋ค.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์๊ณ ๋ง์ผ์ จ์ด์!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋ก๊ทธ์ธ์์ ๋ง๋ฃ์ ์ ์ฌ๋ถ๋ฅผ ์๋ณํ๋๋งํผ SignInPage์ ์์น์ํค๋ ๊ฒ์ ์ด๋จ๊น์?
์ ๊ฐ ์๊ฐํ๋ ๋ฐฉ๋ฒ๋ ์ ๋ฐฐ๊ฐ ์๊ฐํ์๋ ๊ทธ๋ฆผ๊ณผ ๋์ผํ ๊ฒ ๊ฐ์๋ฐ, ๋ชจ๋ฌ์ ํค๋ ํจ์๋ฅผ props
๋ก ์ ๋ฌํ๋ ๋ฐฉ๋ฒ์ ํตํด ๋ก๊ทธ์ธ ์ฑ๊ณต์์ ๋ชจ๋ฌ์ ๋
ธ์ถํ๋ ๋ฐฉ์์ด ์ข์๋ณด์ฌ์. SignUpForm
์์ ํด๋น ๊ตฌ์กฐ๋ฅผ ์ฌ์ฉํ๊ณ ์์ด์!
@seonghunYang @yougyung ์๊ฒฌ์ฃผ์
์ ๊ฐ์ฌํฉ๋๋ค~
|
@seonghunYang @yougyung ์ ํํ ์์ธ์ ๋ชจ๋ฅด๊ฒ ์ผ๋ development ๋ชจ๋์ผ๋ ์ฟ ํค๊ฐ ์ ๋์ํ์ง ์๋ค์ ๊ทธ๋์ ํฌ๋ก๋งํฑ๋ ์คํจํ๋ ๊ฒ ๊ฐ์์ ์ด ๋ฌธ์ ๋ ํด๋น PR ๋จธ์ง ํ ์๋ก์ด PR์์ ์์ ํ๊ฒ ์ต๋๋ค! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- ์๊ณ ํ์ จ์ต๋๋ค
๐ ์์ ๋ด์ฉ
close #138
๋ง์ดํ์ด์ง์ ์๋ ์๋ฌ์ ๊ฐ์ ์ฌํญ๋ค์ ์์ ํ์ต๋๋ค
merge๋ ๋ฐฑ์๋ ์ ๋ฐ์ดํธ์ ๋์์ ์งํํ๊ฒ ์ต๋๋ค
๐ค๋ชจ๋ ์ฌ์ฉ์ ์ฑ์ ํ ์ฌ์ ๋ก๋ ๋ฌธ๊ตฌ ๋ ธ์ถ
์ ๋ฐ์ดํธ ์ ์ฑ์ ํ ๋ฏธ์ ๋ ฅํ ์ ์
: grade-upload ํ์ด์ง์ด๋,์ ๋ฐ์ดํธ ํ ์ฑ์ ํ ๋ฏธ์ ๋ ฅํ ์ ์
: grade-upload ํ์ด์ง ์ด๋,์ ๋ฐ์ดํธ ์ ์ฑ์ ํ ์ ๋ ฅํ ์ ์
: ์๋ด๋ฌธ ๋ ธ์ถ ํ grade-upload ํ์ด์ง ์ด๋,์ ๋ฐ์ดํธ ํ ์ฑ์ ํ ์ ๋ ฅํ ์ ์
: my page์ด๋9์ 3์ผ์ด๋ผ๊ณ ํ๊ธฐ๋์ด์๋๋ฐ, ๋ ์ง๋ ๋ฐฑ์๋ ์ ๋ฐ์ดํธ ๋ ์ง๋ก ๋ณ๊ฒฝ๋ ์์ ์ ๋๋ค.
๐ ๋์์ด ํ์ํ ๋ถ๋ถ