[박인건] Sprint7, Sprint8#313
Merged
kich555 merged 19 commits intocodeit-bootcamp-frontend:React-박인건from Feb 5, 2025
Hidden character warning
The head ref may contain hidden characters: "React-\ubc15\uc778\uac74-sprint8"
Merged
Conversation
Author
|
아직 수정해야할 부분은 많습니다..ㅠ |
kich555
approved these changes
Feb 5, 2025
| accessToken: string; | ||
| }; | ||
|
|
||
| export async function CreateCommentAPI({ |
Collaborator
There was a problem hiding this comment.
컴포넌트가 아닌데 이름이 파스칼케이스네요 카멜케이스로 바꿔주세요!
| }: ProductParams) { | ||
| const response = await fetch(`${baseURL}/products/${productId}/comments`, { | ||
| method: "POST", | ||
| body: JSON.stringify({}), |
Collaborator
There was a problem hiding this comment.
body가 파라미터로 받는게 아니라 빈객체네요?
Comment on lines
+3
to
+13
| export async function GetProductComments({ productId = 1 }) { | ||
| const response = await fetch( | ||
| `${baseURL}/products/${productId}/comments?limit=10` | ||
| ); | ||
|
|
||
| if (!response.ok) { | ||
| throw new Error("코멘트 정보를 가져오는데 실패했습니다."); | ||
| } | ||
| const body = await response.json(); | ||
| return body; | ||
| } |
Collaborator
There was a problem hiding this comment.
try{}catch{} 구문을 사용해서 성공과 실패를 나눠서 처리하면 더 좋을것 같아요
Comment on lines
+4
to
+5
| Email: string; | ||
| Password: string; |
Collaborator
There was a problem hiding this comment.
파라미터도 대문자가 아니라 소문자로 시작하는 카멜케이스가 되어야할 것 같습니다.
Comment on lines
+5
to
+6
| const [email, setEmail] = useState<string>(""); | ||
| const [password, setPassword] = useState<string>(""); |
Collaborator
There was a problem hiding this comment.
이건 하나의 객체 상태로 관리하는게 좀더 좋아보이네요 ㅎ
const [state, setState] = useState<{email:string, password:string}>({email:"",password:''});
Comment on lines
+9
to
+17
| try { | ||
| const data = await SignInAPI({ | ||
| Email: email, | ||
| Password: password, | ||
| }); | ||
| console.log("response 확인: ", data); | ||
| } catch (error) { | ||
| console.error("로그인 실패: ", error); // 콘솔 로그로 에러를 출력 | ||
| } |
Collaborator
There was a problem hiding this comment.
여기에 사용된 try catch구문은 SignInAPI 내부로 들어가야할 것 같아요
Comment on lines
+13
to
+18
| const [productName, setProductName] = useState<string>(); | ||
| const [productInfo, setProductInfo] = useState<string>(); | ||
| const [productPrice, setProductPrice] = useState<string>(); | ||
| const [productTag, setProductTag] = useState<string>(""); | ||
| const [preview, setPreview] = useState<string | null>(null); | ||
| const [hashTags, setHashTags] = useState<HashTag[]>([]); |
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.
Sprint7 요구사항
기본
심화
Sprint8 요구사항
기본
심화
주요 변경사항
스크린샷
멘토에게