-
Notifications
You must be signed in to change notification settings - Fork 14
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
React 김세환 sprint6 #52
base: react-김세환
Are you sure you want to change the base?
The head ref may contain hidden characters: "react-\uAE40\uC138\uD658-sprint6"
React 김세환 sprint6 #52
Conversation
78ad799
to
b5d5281
Compare
f3eb26f
to
b5d5281
Compare
1ce39d5
to
92ce525
Compare
92ce525
to
113950f
Compare
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.
세환님 고생 많으셨습니다!
네이밍 컨벤션 관련해서 좀더 신경써주시면 좋을것 같고,
나머지는 구현 못하신 부분 제외하고 깔끔하게 잘 작성해주신것 같아요 ㅎㅎ
몇가지 코멘트 달아놨으니 한번 확인 부탁드려요~
수고하셨습니다!
page = 1, | ||
sort = "recent", | ||
keyword = "", | ||
} |
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.
요런거 같은때 prettier 가 잘 잡아줍니다~
|
||
export function BestProducts() { | ||
|
||
const emptyHeart = require("../images/emptyHeart.png"); |
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문 아래에 넣어주는 것이 좋습니다!
setBestProducts(data); | ||
data.forEach(product => { | ||
if (!IsImage(String(product.images))) { | ||
product.images = noImageAvailable; |
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.
여기서 넣어주기보다는 아래쪽에서 product.images ?? noImageAvailable로 넣어줘도 괜찮을것 같습니다!
|
||
export function Content() { | ||
|
||
const content_image_01 = require("../images/Img_home_01.png"); |
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.
js인데 변수는 웬만하면 camel case로 해주는게 좋을듯 합니다!
contentImage01 이런식으로요! 그리고 위에서 말씀드린대로 함수 밖에서 선언해주는게 좋습니다
const [selectedOption, setSelectedOption] = useState(null); | ||
|
||
const toggleDropdown = () => { | ||
setIsOpen(!isOpen); |
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.
요런거는 setIsOpen((v) => !v) 요렇게 쓸수 있을것 같아요~
); | ||
} | ||
|
||
return <p className="dropdown-no-options">옵션이 없습니다.</p>; |
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.
이걸 if (options.length == = 0) {
return
}
이런식으로 위에서 먼저 간단한 조건들에 대해서 처리하고 그 아래에서 리스트를 보여주는 로직을 넣어주는게 더 좋아보입니다
tags: product_tags | ||
}; | ||
|
||
fetch("https://backend-c2ut.onrender.com/product", { |
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들은 따로 관리를 하고 함수만 호출하는 형태로 바꾸는게 더 좋을듯 합니다!
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.
reset.css 좋습니다 👍
export const is_image = ["jpg", "jpeg", "png", "gif", "bmp"]; | ||
|
||
export function IsImage(src) { | ||
return is_image.includes(src.split(".").pop()); |
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.
요거는 정규표현식 찾아보시면 더 깔끔하게 바꾸실수 있을것 같아요!
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.
좋습니다 ㅎㅎ 이런 유틸성 헬퍼 파일을 따로 만들고 이름도 image.helper.js 라니!
요구사항
기본 요구사항
공통
프론트엔드 구현 요구사항
랜딩 페이지
중고마켓 페이지
상품 등록 페이지
심화 요구사항
상품 등록 페이지
유효한 조건
주요 변경사항
스크린샷
메인 페이지
중고마켓 페이지
멘토에게