Skip to content
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

[장혁수] sprint6 #173

Conversation

hyeoksuJ
Copy link
Collaborator

요구사항

기본

심화

주요 변경사항

  • 베스트 상품 4개만 불러오기

스크린샷

스크린샷(43)
스크린샷(44)

멘토에게

  • 아직 스프린트 미션 5 미완성입니다.. 다른 코드 봐가면서 해보고 있습니다.

@hyeoksuJ hyeoksuJ requested a review from jyh0521 June 28, 2024 08:14
@hyeoksuJ hyeoksuJ added the 미완성🫠 죄송합니다.. label Jun 28, 2024
Copy link
Collaborator

@jyh0521 jyh0521 left a comment

Choose a reason for hiding this comment

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

과제하느라 고생하셨습니다! 나머지 부분들도 구현해보시면 좋을 것 같아요!

Comment on lines +9 to +16
<BrowserRouter>
<Routes>
<Route path="/" element={<HomePage />} />
<Route path="items" element={<MarketPage />} />
<Route path="login" element={<LoginPage />} />
<Route path="additem" element={<AddItemPage />} />
</Routes>
</BrowserRouter>
Copy link
Collaborator

Choose a reason for hiding this comment

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

라우터 세팅 잘해주셨네요! 404 페이지도 작업해주시면 좋을 것 같습니다.

const query = new URLSearchParams(params).toString();
try {
const response = await fetch(
`https://panda-market-api.vercel.app/products?${query}`
Copy link
Collaborator

Choose a reason for hiding this comment

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

baseURL 부분은 .env 파일로 관리하고 .gitignore에 추가해서 깃에 올라오지 않게 하는 것을 추천드려요!

height: 70px;
padding: 0 200px;
gap: 20px;
border: 1px solid #dfdfdf;
Copy link
Collaborator

Choose a reason for hiding this comment

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

컬러 변수 사용해보시면 좋을 것 같아요!

import styled from 'styled-components';
import Header from '../../header/Header';

const Container = styled.div`
Copy link
Collaborator

Choose a reason for hiding this comment

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

개인적으로 styled-component는 컴포넌트 하단에 작성해주는 편입니다. 컴포넌트의 디자인 요소가 많아질수록 컴포넌트가 하단에 나와서 확인하기가 불편하더라고요!

Comment on lines +14 to +16
const bestItemList = itemList
.sort((a, b) => b.favoriteCount - a.favoriteCount)
.slice(0, 4);
Copy link
Collaborator

Choose a reason for hiding this comment

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

api 요청보낼때, query에 favorite으로 요청보내면 좋아요 순으로 정렬되지 않나요?

@jyh0521 jyh0521 changed the base branch from main to React-장혁수 July 1, 2024 05:52
@jyh0521 jyh0521 merged commit 463d261 into codeit-bootcamp-frontend:React-장혁수 Jul 1, 2024
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.

2 participants