Open
Conversation
kimnamheeee
reviewed
Apr 6, 2024
| <div className="grid grid-cols-4 px-10 mt-10"> | ||
| {postList.map((post) => ( | ||
| <SmallPost key={post.id} post={post} /> | ||
| <Link to={"/" + post.id}> |
There was a problem hiding this comment.
�SmallPost 컴포넌트 자체가 Link로 감싸져 있기 때문에 여기서는 Link로 감싸지 않아도 컴포넌트를 눌렀을 때 PostDetailPage로 이동합니다 !!
kimnamheeee
reviewed
Apr 6, 2024
Comment on lines
+10
to
+12
| *이름: | ||
| </label> | ||
| <input required type="text" id="username" className="input" /> |
There was a problem hiding this comment.
이 부분에 사용자가 이메일을 입력하게 되어있는 만큼 코드에도 기능을 반영해서 일관성을 유지해 주는 건 어떨까요!!
Suggested change
| *이름: | |
| </label> | |
| <input required type="text" id="username" className="input" /> | |
| *이메일: | |
| </label> | |
| <input required type="text" id="email" className="input" /> |
kimnamheeee
reviewed
Apr 6, 2024
| }; | ||
|
|
||
| export const BigPost = ({ post }) => { | ||
| const likeBtnClick = () => { |
There was a problem hiding this comment.
이 함수는 좋아요를 누르는 이벤트가 발생했을 때 호출되는 함수인데요 ! 이런 이벤트 핸들러 함수는 보통 handle어쩌구로 이름을 짓는 것이 일반적입니다 ~ 참고해 주세요 !
Suggested change
| const likeBtnClick = () => { | |
| const handleLike = () => { |
kimnamheeee
reviewed
Apr 6, 2024
kimnamheeee
reviewed
Apr 6, 2024
| </label> | ||
| <input | ||
| required | ||
| value={post.title} |
There was a problem hiding this comment.
이렇게 설정하면 아마 값 수정이 안 될 거예요! defaultValue 속성을 사용해 봐요 ~
Suggested change
| value={post.title} | |
| defaultValue={post.title} |
kimnamheeee
reviewed
Apr 6, 2024
| </label> | ||
| <input | ||
| className="h-64 input" | ||
| value={post.content} |
There was a problem hiding this comment.
여기도 마찬가지로 defaultValue를 쓰면 좋을 것 같아요!
Suggested change
| value={post.content} | |
| defaultValue={post.content} |
kimnamheeee
approved these changes
Apr 6, 2024
kimnamheeee
left a comment
There was a problem hiding this comment.
코드가 야무지고 좋네요!!! 과제 하느라 수고 많으셨습니다 ~
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.
💎 과제 구현 설명
🏁 PR 체크리스트
🖼️ Screenshot / Video
🙌 Issue