-
Notifications
You must be signed in to change notification settings - Fork 17
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 #104
The head ref may contain hidden characters: "react-\uC2E0\uC9C4\uD638-sprint6"
[신진호] SPRINT6 #104
Conversation
const pathname = usePathname(); | ||
|
||
return ( | ||
<span className="flex gap-[20px] text-[18px] font-bold text-[#4B5563] md:gap-[30px]"> |
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.
모바일 일 때의 텍스트사이즈는 16px입니다. 보통 모바일일 때와 데스크탑일 때의 네비게이션 메뉴의 텍스트 사이즈가 다른 경우가 많으니 고려해서 눈여겨 보시면 좋을 것 같습니다.
return () => { | ||
window.removeEventListener("scroll", handleScroll); | ||
}; | ||
}, [loading, hasMore]); |
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.
의존성배열에 loading, hasMore 는 없는 것이 좋습니다. 이벤트리스너는 컴포넌트 마운트 시 단 한번만 실행시켜놓게 하고, 페이지 이동으로 인해 언마운트 시 이벤트리스너 메모리 해제되는 로직으로만 해도 충분합니다. 현재는 로딩상태나 hasMore 값이 바뀔때마다 새로운 이벤트리스너를 또 실행시키는 형국이라 메모리누수에 해당됩니다.
return ( | ||
<> | ||
<div className="mb-[160px] mt-8 grid grid-cols-2 gap-2 md:grid-cols-3 md:gap-4 xl:grid-cols-5 xl:gap-6"> | ||
{products.map((product, index) => ( |
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.
map 으로 뿌려지는 ProductCard UI도 컴포넌트로 별도로 분리해주시는 것을 권장 드립니다.
@@ -0,0 +1,5 @@ | |||
import ItemsPage from "@/views/ItemsPage/ItemsPage"; | |||
|
|||
export default function items() { |
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.tsx 더라도 컴포넌트명은 항상 파스칼케이스를 따르는 것이 좋고 페이지 컴포넌트면 뒤에 Page 를 붙여서 ItemsPage 정도로 컴포넌트명을 만들어주시면 좋겠습니다.
모든 프론트엔드 만족사항들을 잘 만족시켜주셨습니다. 고생하셨습니다.
|
공통
Github에 스프린트 미션 PR을 만들어 주세요.
React, Express를 사용해 진행합니다.
프론트엔드 구현 요구사항
랜딩 페이지
HTML과 CSS로 구현한 랜딩페이지를 React로 마이그레이션하세요.
랜딩 페이지 url path는 "/"로 설정하세요.
중고마켓 페이지
상품 등록 페이지
링크
https://lovely-puffpuff-7b374b.netlify.app/
감사합니다.