-
Notifications
You must be signed in to change notification settings - Fork 35
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
The head ref may contain hidden characters: "React-\uC7A5\uD601\uC218-sprint6"
[장혁수] sprint6 #173
Conversation
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.
과제하느라 고생하셨습니다! 나머지 부분들도 구현해보시면 좋을 것 같아요!
<BrowserRouter> | ||
<Routes> | ||
<Route path="/" element={<HomePage />} /> | ||
<Route path="items" element={<MarketPage />} /> | ||
<Route path="login" element={<LoginPage />} /> | ||
<Route path="additem" element={<AddItemPage />} /> | ||
</Routes> | ||
</BrowserRouter> |
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.
라우터 세팅 잘해주셨네요! 404 페이지도 작업해주시면 좋을 것 같습니다.
const query = new URLSearchParams(params).toString(); | ||
try { | ||
const response = await fetch( | ||
`https://panda-market-api.vercel.app/products?${query}` |
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.
baseURL 부분은 .env 파일로 관리하고 .gitignore에 추가해서 깃에 올라오지 않게 하는 것을 추천드려요!
src/components/header/Header.css
Outdated
height: 70px; | ||
padding: 0 200px; | ||
gap: 20px; | ||
border: 1px solid #dfdfdf; |
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 styled from 'styled-components'; | ||
import Header from '../../header/Header'; | ||
|
||
const Container = styled.div` |
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.
개인적으로 styled-component는 컴포넌트 하단에 작성해주는 편입니다. 컴포넌트의 디자인 요소가 많아질수록 컴포넌트가 하단에 나와서 확인하기가 불편하더라고요!
const bestItemList = itemList | ||
.sort((a, b) => b.favoriteCount - a.favoriteCount) | ||
.slice(0, 4); |
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.
api 요청보낼때, query에 favorite으로 요청보내면 좋아요 순으로 정렬되지 않나요?
요구사항
기본
심화
주요 변경사항
스크린샷
멘토에게