Skip to content

Conversation

@Taeil08
Copy link
Collaborator

@Taeil08 Taeil08 commented May 11, 2025

요구사항

https://chipper-centaur-e6ae79.netlify.app/Items

기본

  • 품 상세 페이지 주소는 "/items/{productId}" 입니다.
  • response 로 받은 아래의 데이터로 화면을 구현합니다.
  • 목록으로 돌아가기 버튼을 클릭하면 중고마켓 페이지 주소인 "/items" 으로 이동합니다
  • 문의하기에 내용을 입력하면 등록 버튼의 색상은 "3692FF"로 변합니다.
  • response 로 받은 아래의 데이터로 화면을 구현합니다

심화

  • 모든 버튼에 자유롭게 Hover효과를 적용하세요.

주요 변경사항

스크린샷

스크린샷 2025-05-11 오후 10 29 10

멘토에게

  • 셀프 코드 리뷰를 통해 질문 이어가겠습니다.

@Taeil08 Taeil08 self-assigned this May 11, 2025
@Taeil08 Taeil08 added the 매운맛🔥 뒤는 없습니다. 그냥 필터 없이 말해주세요. 책임은 제가 집니다. label May 11, 2025
@GANGYIKIM GANGYIKIM closed this May 15, 2025
@Taeil08 Taeil08 reopened this May 15, 2025
Copy link
Collaborator

@GANGYIKIM GANGYIKIM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

태일님 React 미션 고생하셨어요.
여러개의 미션을 한번에 리뷰 드려서 코멘트 양이 많습니다.
혹시나 해서 말씀드리지만 코멘트 반영은 필수가 아닌 선택사항이에요.
다만 학습에 도움이 되실것 같은 내용들로 남겨드렸으니 시간이 되신다면 반영하시길 추천드립니다.
다음 8번째 미션도 화이팅이에요!

@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❗️ 수정요청

Suggested change
<html lang="en">
<html lang="ko">

<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React</title>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💊 제안
유저가 알 수 있게 타이틀 태그를 수정해주시고 미션에서 추가하셨던 메타 태그도 추가하시면 더 좋을 것 같아요!

Suggested change
<title>Vite + React</title>
<title>판다마켓</title>

<Route path="/LogIn" element={<LogIn />} />
<Route path="/SignUp" element={<SignUp />} />
<Route path="/SignIn" element={<SignIn />} />
<Route path="/Items" element={<Items />} />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❗️ 수정요청
품 상세 페이지 주소는 "/items/{productId}" 입니다. 와 같은 요청 사항에 적혀있는 주소로 설정 하시는 것을 추천드려요!

Suggested change
<Route path="/Items" element={<Items />} />
<Route path="/items" element={<Items />} />

Comment on lines +6 to +10
createRoot(document.getElementById('root')).render(

<App />

)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❗️ 수정요청

Suggested change
createRoot(document.getElementById('root')).render(
<App />
)
createRoot(document.getElementById('root')).render(<App />)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💊 제안
pages/Home 에서는 Components 폴더 하단에 컴포넌트 파일을 두시고 다른 페이지에서는 pages/{pageNmae} 하단에 두셨네요~
한 방향으로 통일하시면 더 좋을 것 같아요!

Comment on lines +294 to +296
{product.images && (
<img src={product.images[0]} alt={product.name} />
)}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💊 제안
상품 생성시 이미지가 필수값이 아니라서 없을 수 있습니다. 그럴때 대체 이미지를 보여주시면 더 좋을 것 같아요!

Comment on lines +290 to +296
{product && (
<>
<ProductWrapper>
<ProductImage>
{product.images && (
<img src={product.images[0]} alt={product.name} />
)}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💬 여담
product의 기본값을 빈객체로 설정하면 아래처럼 작성이 가능합니다.
지금처럼 product 값이 있을때 UI가 보인다면, 로딩중에는 해당 영역이 다 노출되지 않으니 스켈레톤을 추가해주시는 것처럼 영역을 유지할 수 있게 작업하시면 좋겠습니다.

Suggested change
{product && (
<>
<ProductWrapper>
<ProductImage>
{product.images && (
<img src={product.images[0]} alt={product.name} />
)}
// const [product, setProduct] = useState({});
<>
<ProductWrapper>
<ProductImage>
{product?.images && (
<img src={product.images[0]} alt={product.name} />
)}


const isFormValid = inquiryText.trim().length > 0;

const handleAddComment = () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💊 제안
스웨거 상에서 각 API 옆에 있는 자물쇠 모양은 해당 API에서 token이 필요할 경우 보여집니다.

스크린샷 2025-05-14 오후 4 16 33

코멘트 생성, 삭제, 수정 모두 회원가입 이후 구현이 가능한 로직이니 추후 구현하시면 됩니다~

{menuOpen && (
<Menu>
{isEditing ? (
<MenuItem onClick={handleSave}>저장</MenuItem>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💊 제안
인터렉션이 가능한 요소라서 div보다 button이 더 적절할 것 같아요.

              const handleSave = () => {
                onEdit(id, editText.trim());
                setIsEditing(false);
                setMenuOpen(false);
              };
              ...
              <MenuItem disabled={!editText.trim()} onClick={handleSave}>저장</MenuItem>


const QuestionText = styled.div``;

const EditInput = styled.input`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❗️ 수정요청
여러줄 입력이 가능한 textarea가 더 적절할 것 같아요!

Suggested change
const EditInput = styled.input`
const EditInput = styled.textarea`

@GANGYIKIM GANGYIKIM merged commit 88d0dd7 into codeit-bootcamp-frontend:React-김태일 May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

매운맛🔥 뒤는 없습니다. 그냥 필터 없이 말해주세요. 책임은 제가 집니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants