Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: 사서 대출권수 변경 #620
feat: 사서 대출권수 변경 #620
Changes from 13 commits
2a1079f
6655d5e
426c95f
1c10729
6ea9ec7
afbbcbe
b612710
0b344a3
a24613f
8e0e2ee
db632ed
e56f1ff
5de1deb
314ccc3
ed99a11
702403f
c53f6fe
bd2e37b
516754d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Large diffs are not rendered by default.
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.
34번 라인같은 코드가 많이 보이는데 함수도 빼면 가독성이 더 좋을거 같아요. util함수 같은 느낌으로다가 constant 폴더에 넣으면 적합하다고 생각합니다.
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.
constant의 status.js에 함수화 시켜서 넣어봤습니다. 해당 함수에 객체를 인자로 넘기는데, 객체의 요소(isAdmin이나 id)가 undefined 같은 빈 값으로 들어오는 것도 고려해야 좋은지 고민이 됩니다.
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.
이 코멘트를 늦게 봤네요..
아래 제안사항과 같이 옵셔널 체이닝을 이용하면
undefined
에서 접근할 때 터지는 걸 예방할 수 있어서 옵셔널 체이닝으로 수정해두고,값 검증이 필요하다면 타입을 추후에 추가하거나 하면 좋을 거 같습니다.
https://github.com/jiphyeonjeon-42/frontend/pull/620/files#r1778081559