Open
Conversation
whwoohw
reviewed
May 31, 2023
whwoohw
left a comment
There was a problem hiding this comment.
고생했어용! 간단하게 수정할만한 내용들 코멘트로 남겨놨습니다.
수정하시면 merge까지 해주세욥!!
| major: "", | ||
| }); | ||
|
|
||
| const [originalData, setOriginalData] = useState({}); |
There was a problem hiding this comment.
꼭 필요하지는 않지만 originalData도 미리 안에 프로퍼티들을 정의해줘도 좋을것같아욥
| }); | ||
|
|
||
| const [postList, setPostList] = useState([]); | ||
| const [id, setId] = useState(""); |
There was a problem hiding this comment.
id는 number기 때문에 초기값을 "" 로 설정하는건 좀 이상하겠죠?
typescript를 쓰다보면 더 익숙해질거예요!
|
|
||
| const [postList, setPostList] = useState([]); | ||
| const [id, setId] = useState(""); | ||
| const [tags, setTags] = useState([]); |
Comment on lines
+34
to
+41
| const getTagsAPI = async () => { | ||
| const tags = await getTags(); | ||
| const tagContents = tags.map((tag) => { | ||
| return tag.content; | ||
| }); | ||
| setTags(tagContents); | ||
| }; | ||
| getTagsAPI(); |
Comment on lines
+99
to
+101
| onClick={() => { | ||
| handleCancelEdit("email"); | ||
| }} |
There was a problem hiding this comment.
사실 button id를 email과 같은 type으로 설정하면, 모든 취소하기를 한 개의 function으로 처리할 수 있을 것 같아요!
|
|
||
| <button | ||
| className="button flex-shrink-0 ml-2" | ||
| onClick={() => setIsEdit({ ...isEdit, email: true })} |
There was a problem hiding this comment.
이 부분도 button id를 email로 처리하면 더 편할 것 같아요!
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.
김세현 11주차 react 과제 제출합니다