-
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
Feature/에러 메세지 상수화 #846 #855
The head ref may contain hidden characters: "feature/\uC5D0\uB7EC_\uBA54\uC138\uC9C0_\uC0C1\uC218\uD654_#846"
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.
eslint 에러나는 거 확인 부탁드려요!
대부분 절대경로로 사용되는(@ 붙은거!) 것들이 상대 경로로 사용된 것 보다 위치가 밑에 있어서 뜨는 에러 같아요!
src/constants/apiResponseMsg.ts
Outdated
success: {}, | ||
error: { | ||
noSubmissionsLeft: '남은 제출 횟수가 없습니다.', | ||
invalidAttendanceWithCount: (min: number) => `출석코드가 틀렸습니다. (남은 제출횟수 ${min}회)` as const, |
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.
요기는 왜 as const가 붙은 걸까요?!
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.
src/constants/apiResponseMsg.ts
Outdated
errror: { | ||
existingStudentId: '이미 존재하는 학번입니다.', | ||
}, | ||
}; |
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.
폴더명 Msg 보다는 풀어서 Message는 어떨까용!
src/api/memberApi.ts
Outdated
@@ -123,7 +124,7 @@ const useEditEmailMutation = () => { | |||
const { handleError } = useApiError({ | |||
400: { | |||
default: () => { | |||
toast.error('현재 비밀번호가 일치하지 않습니다.'); | |||
toast.error(PASSWORD.error.passwordMismatch); |
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.
passwordMismatch보다 �mismatchPassword 는 어떨까용..? duplicateSeminarDate도 그렇고 동사 -> 명사 순인 것 같아서 통일하면 좋을 것 같아요!
src/constants/apiResponseMsg.ts
Outdated
|
||
export const PASSWORD = { | ||
success: { | ||
changedSuccess: '비밀번호가 변경되었습니다.', |
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.
changedSuccess 보다 changedPassword는 어떨까합니다! PASSWORD.success.~
로 이미 success인걸 바로 알 수 있어서용!
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.
음음.. 아예 changedPassword 보다 changed 로도 충분히 이해되지 않을까.. 합니다...
src/constants/apiResponseMsg.ts
Outdated
|
||
export const ID = { | ||
success: {}, | ||
errror: { |
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.
errror! r이 중간에 3개에용!
src/constants/apiResponseMsg.ts
Outdated
changedSuccess: '비밀번호가 변경되었습니다.', | ||
}, | ||
error: { | ||
passwordMismatch: '현재 비밀번호가 일치하지 않습니다.', |
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.
이부분도 mismatch로 적어도 이해할 수 있을 것 같아요! PASSWORD.error.mismatch 로 들어가니까요!
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.
큰 코멘트는 없어서 Approve 하겠습니다. 👍
src/constants/apiResponseMessage.ts
Outdated
}, | ||
} as const; | ||
|
||
export const POST = { |
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.
큰 상관은 없을 듯 하긴 한데 POST 대신 BOARD는 어떨까요...?
REST API의 POST랑 용어가 겹쳐보입니다.
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.
오옹 저도 REST API의 POST가 살짝 떠올랐었는데..! ㅎㅎ
src/constants/apiResponseMessage.ts
Outdated
}, | ||
} as const; | ||
|
||
export const 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.
API와 용어를 맞추기 위해 LOGIN_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.
굿이에용~👍
연관 이슈
작업 요약
작업 상세 설명
리뷰 요구사항
2분