Skip to content

React 이석우 sprint mission 5 (V2) 제출#70

Open
dolby527 wants to merge 6 commits intocodeit-sprint-fullstack:react-이석우from
dolby527:react-이석우

Hidden character warning

The head ref may contain hidden characters: "react-\uc774\uc11d\uc6b0"
Open

React 이석우 sprint mission 5 (V2) 제출#70
dolby527 wants to merge 6 commits intocodeit-sprint-fullstack:react-이석우from
dolby527:react-이석우

Conversation

@dolby527
Copy link
Collaborator

안녕하세요?
미션 5 과제 제출합니다.

@dolby527 dolby527 requested a review from reach0908 January 14, 2026 15:54
@dolby527 dolby527 self-assigned this Jan 14, 2026
<Route path="/items" element={<ItemsPage />} />

{/* 상품 등록 페이지 */}
<Route path="/Registeration" element={<RegisterationPage />} />
Copy link
Collaborator

Choose a reason for hiding this comment

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

라우트 경로 오타 및 대소문자 일관성

/Registeration/registration으로 수정해주세요.

  1. 오타: RegisterationRegistration
  2. 대소문자: 다른 라우트(/items)는 소문자인데, 이 라우트만 대문자로 시작합니다.
// 수정 제안
<Route path="/registration" element={<RegistrationPage />} />

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Registeration으로 당초 통일하였고, 소문자 시작으로 조정하였습니다.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

RegisterationPage가 맞는것이어서 그대로 반영하였습니다.

@@ -0,0 +1,22 @@
import React from "react";
import HeartIcon from "../../../assets/images/icons/ic_heart.svg";
import DefaultImage from "../../../assets/images/icons//defaultimage.png";
Copy link
Collaborator

Choose a reason for hiding this comment

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

이미지 경로에 슬래시 중복

// 현재
import DefaultImage from "../../../assets/images/icons//defaultimage.png";
//                                                    ^^ 슬래시 두 개

// 수정 제안
import DefaultImage from "../../../assets/images/icons/defaultimage.png";

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

//증복 슬래시 제거하였습니다.

function ItemCard({ item }) {
return (
<div className="itemCard">
{<img src={DefaultImage} alt={DefaultImage} className="itemCardThumbnail" />}
Copy link
Collaborator

Choose a reason for hiding this comment

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

불필요한 중괄호 및 alt 속성 개선

// 현재
{<img src={DefaultImage} alt={DefaultImage} ... />}

// 수정 제안
<img src={DefaultImage} alt="상품 이미지" ... />
  • 불필요한 {} 중괄호 제거
  • alt에 이미지 경로 대신 의미있는 텍스트 사용

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

의미있는 코드 "상품 이미지"로 변경하였습니다.

@@ -0,0 +1,6 @@
import React from "react";

Copy link
Collaborator

Choose a reason for hiding this comment

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

재사용성 개선 필요

현재 하드코딩된 텍스트와 클래스명으로 재사용성이 낮습니다.

// 수정 제안
function Button({ children, className, onClick, ...props }) {
  return (
    <button className={className} onClick={onClick} {...props}>
      {children}
    </button>
  );
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

재사용성 개선 코드로 변경하였습니다.

throw new NotFoundException('등록하신 상품을 찾을 수 없습니다.');
}

res.json({
Copy link
Collaborator

Choose a reason for hiding this comment

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

console.log 제거

프로덕션 코드에서는 console.log를 제거하거나 로깅 라이브러리를 사용해주세요.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

관련 console.log 제거 하였습니다.

});

// POST /products - 새 product 생성
productRouter.post('/', validateProduct, async (req, res, next) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

주석 처리된 코드 정리

사용하지 않는 주석 코드는 삭제해주세요. Git 히스토리에서 추적 가능합니다.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

불필요한 채 comment는 제거하도록 하겠습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants