[박준환] sprint8#279
Open
park521 wants to merge 1 commit intocodeit-bootcamp-frontend:React-박준환from
Hidden character warning
The head ref may contain hidden characters: "React-\ubc15\uc900\ud658-sprint8"
Open
Conversation
devToram
reviewed
Jan 7, 2025
| import "./Header.css"; | ||
|
|
||
| // react-router-dom의 NavLink를 이용하면 활성화된 네비게이션 항목을 하이라이트해줄 수 있어요! | ||
| function getLinkStyle({ isActive }: { isActive: boolean }) { |
Collaborator
There was a problem hiding this comment.
Suggested change
| function getLinkStyle({ isActive }: { isActive: boolean }) { | |
| function getLinkStyle(isActive: boolean) { |
으로 간결하게 쓸 수 있을 거 같아요!
devToram
reviewed
Jan 7, 2025
| setIsDropdownVisible(false); | ||
| }} | ||
| > | ||
| 최신순 |
Collaborator
There was a problem hiding this comment.
타입스크립트로 바꾸시는 김에 <최신순>, <인기순> 도 타입화해보시면 좋을 거 같아요!
devToram
approved these changes
Jan 7, 2025
Collaborator
devToram
left a comment
There was a problem hiding this comment.
아직 확장자만 ts 이고, 실제 타입스크립트를 적용한 부분이 많지 않아서 간략하게 리뷰했습니다~
Comment on lines
+31
to
+34
| onClick={() => { | ||
| onSortSelection("favorite"); | ||
| setIsDropdownVisible(false); | ||
| }} |
Collaborator
There was a problem hiding this comment.
렌더부에서 넣어줄 값이 없는 경우에는 해당 값을 따로 함수로 빼서 넣어주시는 걸 추천드려요!
const handleItemClick = () => {
onSortSelection("favorite");
setIsDropdownVisible(false);
}
Suggested change
| onClick={() => { | |
| onSortSelection("favorite"); | |
| setIsDropdownVisible(false); | |
| }} | |
| onClick={handleItemClick} |
Comment on lines
+31
to
+33
| size, | ||
| fillColor, | ||
| outlineColor, |
Collaborator
There was a problem hiding this comment.
요런 친구들도 props 인 경우는 타입 써주시는 게 좋습니다!
| function AddItemPage() { | ||
| const [name, setName] = useState(""); | ||
| const [description, setDescription] = useState(""); | ||
| const [price, setPrice] = useState(""); |
Collaborator
There was a problem hiding this comment.
price 의 경우 숫자라고 생각이 드는데 초기값이 "" 라서 타입병기해주시면 좋을 거 같아요!
Suggested change
| const [price, setPrice] = useState(""); | |
| const [price, setPrice] = useState<string>(""); |
| const [name, setName] = useState(""); | ||
| const [description, setDescription] = useState(""); | ||
| const [price, setPrice] = useState(""); | ||
| const [tags, setTags] = useState([]); |
Collaborator
There was a problem hiding this comment.
배열의 경우에도 안에 어떤 값이 올 지 적어주심 좋아요!
Suggested change
| const [tags, setTags] = useState([]); | |
| const [tags, setTags] = useState<Array<string>>([]); |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
요구사항
기본
심화
주요 변경사항
스크린샷
멘토에게