-
Notifications
You must be signed in to change notification settings - Fork 0
fix:: 카테고리 수정 #47
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
Merged
Merged
fix:: 카테고리 수정 #47
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
안녕하세요! 카테고리 관련 데이터가 여러 파일에 중복으로 정의되어 있어 유지보수성을 개선할 점이 보입니다.
현재 카테고리(전공) 데이터는 다음과 같이 여러 곳에 흩어져 있습니다:
MyPage.tsx:MemberProfile인터페이스의major타입MyPage.tsx:majorToInterestMap객체SignupPage.tsx:interestList배열src/assets/shared/ListData.tsx:interestList배열이로 인해 새로운 카테고리를 추가하거나 수정할 때 여러 파일을 변경해야 하며, 이번 PR에서
GAME_DEVELOPMENT를GAME_DEVELOP으로 수정하신 것처럼 불일치가 발생할 수 있습니다.개선 제안:
src/assets/shared/ListData.tsx와 같은 공통 파일에 카테고리 데이터를 중앙에서 관리하는 것을 제안합니다. 예를 들어, 다음과 같은 구조를 사용할 수 있습니다.이렇게 하면,
CATEGORIES배열만 수정하면 모든 관련 타입과 데이터가 자동으로 업데이트됩니다.MyPage.tsx와SignupPage.tsx에서는 이 중앙 데이터를 가져와 사용하면 되므로 코드 중복이 사라지고 일관성이 유지됩니다.major타입도import하여 사용할 수 있습니다.이 리팩토링을 통해 앞으로 카테고리 관리가 훨씬 쉬워질 것입니다. 검토 부탁드립니다!