-
Notifications
You must be signed in to change notification settings - Fork 37
[최제원] sprint7 #270
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
[최제원] sprint7 #270
The head ref may contain hidden characters: "React-\uCD5C\uC81C\uC6D0-sprint7"
Conversation
kich555
left a comment
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.
고생하셨습니다 ㅎ
| console.error("Failed to fetch product by ID:", error); | ||
| throw error; |
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.
👍👍
| import { ReactComponent as CloseIcon } from "../../assets/images/icons/ic_x.svg"; | ||
|
|
||
| const Button = styled.button` | ||
| background-color: ${({ theme }) => theme.colors.gray[0]}; |
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.
👍👍👍
|
|
||
| function DeleteButton({ onClick, label }) { | ||
| return ( | ||
| <Button aria-label={`${label} 삭제`} onClick={onClick}> |
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.
Type도 명시되면 더 좋겠네요 ㅎ
| const fetchProduct = async () => { | ||
| try { | ||
| const data = await getProductsById(productId); | ||
| setProduct(data); | ||
| } catch (error) { | ||
| console.error("Failed to fetch product details:", error); | ||
| } finally { | ||
| setLoading(false); | ||
| } | ||
| }; |
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.
getProductsById에서 이미 try catch하고 logging처리까지 하고있지 않나요? 그러면 여기의 catch구문에서는
setError 와 같이 UI에 영향이 갈 리액트의 에러상태를 컨트롤하는게 맞아보여요 다시 로그를 찍는것보단 ㅎ
요구사항
기본
심화
주요 변경사항
스크린샷
멘토에게
반응형 웹은 만들지 못하였습니다.
위 스크린샷 두 장을 비교해보면 유저에 관한 위치가 다릅니다. 아이패드가 요구사항의 디자인 시안입니다. html 구조를 만들때 잘못 만든건지, 아니면 css로 구현을 하지 못한건지 모르겠지만, 만들다가 막혀서 질문드립니다. 처음에 space-between으로 속성을 주웠는데, 이후 다른 div태그들의 간격을 변경하려고 하니 space-between 속성에 묻혀 변경되지 않아 다른 방법으로 하려고 햇으나, 찾지 못하엿습니다. ㅠㅠ 간단하게라도 설명해주시면 이후 찾아서 만들어보겠습니다 !! 감사합니다 !!
셀프 코드 리뷰를 통해 질문 이어가겠습니다.