-
Notifications
You must be signed in to change notification settings - Fork 0
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
refactor: 상품 페이지 개편 #50
Conversation
🔗 배포된 storybook 주소: https://65f015a4aed45406385006ee-xacckobqsc.chromatic.com/ |
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.
고생했어요 황펭... 코드 보는데도 빡세네요 6시간이라니
일단 제 의견을 전달하자면
- 카테고리 이미지가 원형으로 변하면서 사이즈가 애매한 것 같은데 디자이너분께 보여드리는거 어떠신가요??
- 카테고리 리스트 컴포넌트 나눈 이유 api 두 개 한번에 안쏠려고 그랬던걸로 기억..
- 그리고 가로 스크롤 안보이게 하는거 어때요?!
아무튼 나머지는 코멘트 확인해주시고~~~ 고생하셨습니다~~~~~
handleTabMenuSelect: (index: number) => void; | ||
tabMenus: Tab[]; | ||
selectedTabMenu: string; | ||
handleTabMenuSelect: (selectedMenu: any) => void; |
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.
any
..! 이거 타입이 바뀌었나요?
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.
눈물난다..
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.
좋은 의견 있음 주세요..
export const menuName = styleVariants({ | ||
active: [menuNameBase, { fontWeight: 700, color: '#232527', borderBottom: '3px solid #444' }], | ||
default: [menuNameBase, { fontWeight: 600, color: '#999' }], | ||
}); |
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.
아하 이거 이렇게 쓰는거군여?
@@ -1,18 +1,16 @@ | |||
import { useState } from 'react'; | |||
|
|||
const INIT_TAB_INDEX = 0; | |||
const useTabMenu = <T = string>(init: T) => { |
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.
이 init이 처음에 선택된 메뉴라는 뜻인가여?
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.
옙 초기값이요
@@ -37,9 +38,15 @@ const CategoryItem = ({ categoryId, name, image, categoryType }: CategoryItemPro | |||
return ( | |||
<button type="button" onClick={() => handleCategoryItemClick(categoryId)}> | |||
<div className={imageWrapper}> | |||
<img className={categoryImage} src={image.src} width={image.width} height={image.height} alt={name} /> | |||
<img | |||
className={cx(categoryImage, { [circle]: isCircular })} |
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.
cx <- 이거 쓴 이유가 뭐에요?
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.
조건부 클래스네임 줄 때 유용한 라이브러리라 사용했슴다
https://github.com/JedWatson/classnames
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.
바닐라 익스트랙트에는 불리언 값을 넘겨줄 수 없어서 안 될거 같네요..?
TabMenu, | ||
SectionHeader, | ||
} from '@/components/Common'; | ||
import ProductPreviewList from '@/components/Product/ProductPreviewList/ProductPreviewList'; |
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.
이거 index.ts에서 import 안된거 같아여
import ProductPreviewList from '@/components/Product/ProductPreviewList/ProductPreviewList'; | ||
import { CATEGORY_TYPE } from '@/constants'; | ||
import { useTabMenu } from '@/hooks/common'; | ||
import { useCategoryQuery } from '@/hooks/queries/product/useCategoryQuery'; |
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.
여기두
{selectedTabMenu === TAB_MENUS[0].value ? ( | ||
<CategoryFoodList location="products" hasName isCircular /> | ||
) : ( | ||
<CategoryStoreList location="products" hasName /> | ||
)} |
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.
{selectedTabMenu === TAB_MENUS[0].value ? ( | |
<CategoryFoodList location="products" hasName isCircular /> | |
) : ( | |
<CategoryStoreList location="products" hasName /> | |
)} | |
<CategoryFoodList location="products" hasName isCircular={selectedTabMenu === TAB_MENUS[0].value } /> |
이렇게 쓰는건 어떠신가요?!
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.
엥 다른거네!
@@ -2,22 +2,41 @@ import { categoryFoodListWrapper } from './categoryFoodList.css'; | |||
import CategoryItem from '../CategoryItem/CategoryItem'; | |||
|
|||
import { CATEGORY_TYPE } from '@/constants'; | |||
import { useCategoryFoodQuery } from '@/hooks/queries/product'; | |||
import { useCategoryFoodQuery } from '@/hooks/queries/product/useCategoryQuery'; |
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.
여기도 index.ts!
옙 좋습니다~
우짤까요. 저는 합쳐서 컴포넌트 하나로 써도 괜찮을거 같은데. 타입별로 스타일 만들어서
굿굿 레이아웃 pr에 적용했읍니다 |
🔗 배포된 storybook 주소: https://65f015a4aed45406385006ee-ggoedcbilu.chromatic.com/ |
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.
진짜진짜 수고 많았습니다!
테스트까지 작성하셨군요???
근데 접때 테스트 아예 안돌아가던데 어캐 해결하셨죠???
const categoryType = CATEGORY_TYPE.STORE; | ||
|
||
const CategoryStoreList = () => { | ||
const { data: categories } = useCategoryStoreQuery(categoryType); | ||
const imgSize = { |
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.
얘는 진짜 width만 2밖에 차이 안나는거라서, 디자이너분한테 하나로 고정시켜달라고 말하는게 좋을 거 같네요.
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.
좋슴다
handleTabMenuSelect: (index: number) => void; | ||
tabMenus: Tab[]; | ||
selectedTabMenu: string; | ||
handleTabMenuSelect: (selectedMenu: any) => void; |
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.
뚀르륵,,,
@hae-on |
🔗 배포된 storybook 주소: https://65f015a4aed45406385006ee-jhwlonyalt.chromatic.com/ |
🔗 배포된 storybook 주소: https://65f015a4aed45406385006ee-zyhomlndga.chromatic.com/ |
🔗 배포된 storybook 주소: https://65f015a4aed45406385006ee-azsxhzifhb.chromatic.com/ |
Issue
✨ 구현한 기능
📢 논의하고 싶은 내용
🎸 기타
⏰ 일정