-
Notifications
You must be signed in to change notification settings - Fork 5
Feature/wineid #49
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
Feature/wineid #49
Conversation
|
Someone is attempting to deploy a commit to the 626-ju's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for Git โ๏ธ
|
src/pages/wines/[wineid].tsx
Outdated
| </ImageCard> | ||
| <div className='flex flex-col xl:flex-row max-w-[1140px] w-full mx-auto justify-between '> | ||
| <div className='flex-col order-2 xl:order-1 xl:max-w-[1140px] '> | ||
| <h2 className='hidden xl:block mb-[22px] xl:custom-text-xl-bold'>๋ฆฌ๋ทฐ ๋ชฉ๋ก</h2> |
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.
hidden(display:none)์ ์๊ฐ์ ์ผ๋ก๋ ์ ๊ทผ์ฑ์ธก๋ฉด์์๋ ์์ ๋ฌด์๋๊ธฐ๋๋ฌธ์ ํน์ ํ ๊ฒฝ์ฐ๊ฐ ์๋๋ฉด, ํนํ ์ง๊ธ๊ณผ ๊ฐ์ ๊ฒฝ์ฐ์๋ sr-only๋ฅผ ์ถ์ฒ๋๋ ค์. (ํน์ ํ ๊ฒฝ์ฐ* ํญui, ๋ชจ๋ฌui ๋ฑ)
| <h2 className='hidden xl:block mb-[22px] xl:custom-text-xl-bold'>๋ฆฌ๋ทฐ ๋ชฉ๋ก</h2> | |
| <h2 className='sr-only xl:block mb-[22px] xl:custom-text-xl-bold'>๋ฆฌ๋ทฐ ๋ชฉ๋ก</h2> |
src/pages/wines/[wineid].tsx
Outdated
| <ul> | ||
| {testReviews.map((review) => ( | ||
| <li key={review.id} className='mb-[16px] md:mb-[24px] xl:mb-[20px]'> | ||
| <ReviewCard |
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.
compound ํจํด ์ถ์ฒ๋๋ฆฝ๋๋ค
์ด์ ๋ ์๋์ ๊ฐ์ต๋๋ค
- ReviewCard์ ์ธํฐํ์ด์ค(prop)์ด ๋ง์์ ํ์ /์์ธกํ๊ธฐ ์ด๋ ต์ต๋๋ค => ReviewCard๊ฐ ๋ค๊ณ ์๋ ๊ด์ฌ์ฌ๊ฐ ๋๋ฌด ๋ง์ต๋๋ค
- slot prop์ผ๋ก ๋ด๋ ค์ค ์ปดํฌ๋ํธ๋ ๋ฆฌ๋ ๋๋ง๋๋ฉด์ (์ฌ๊ธฐ์ ๋จ์ui์ง๋ง)๋ด๋ถ์ ์ํ๋ฅผ ๊ด๋ฆฌํ๋ ์ปดํฌ๋ํธ๋ผ๋ฉด ๋ฌธ์ ๊ฐ ์๊ธธ์์์ต๋๋ค.
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.
๋ต ๊ฐ์ฌํฉ๋๋ค! ๋ฐ์ํ๋๋ก ํ๊ฒ ์ต๋๋ค :)
-sr-only์๋ค๊ฐ xl:not-sr-only๋ก ๋ณ๊ฒฝํ๋ฉด ๊ธฐ์กด์ ์ค์ ํด๋ ๋ง์ง์ด ์ค๋ฒ๋ผ์ด๋ฉ ๋๋ ๊ฒ ๊ฐ์ ๊ธฐ์กด๋ง์ง์ ! ์ฌ์ฉํ์ต๋๋ค.
| function Kebab() { | ||
| //์ ์ง๋์ด ๋ง๋ ๊ฑฐ๋ ๊ฒน์น๋ ๊ฑฐ ๊ฐ์๋ฐ ๋์ค์ ํฉ์ณ์ง๋ฉด ๊ทธ๊ฑธ๋ก ์์ ํด๋๊ฒ ์ต๋๋ค. | ||
| function onSelect(value: string) { | ||
| //-> ์๊ฑฐ ํน์ ์ ๋ฒ์ ๋ฉํ ๋๊ป์ ์ ๋ค๋ฆญ ๊ด๋ จ ํผ๋๋ฐฑ ํด์ฃผ์ ๊ฑฐ ๋ฐ์๋์ด ์์๊น์??? |
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์ฐจ QA ํผ๋๋ฐฑ ๋ฐ์ ํ ๋ฐ๋ก ์์ ํ๊ฒ ์ต๋๋ค.
| ReviewCard.ToggleButton = function TogleButton({ reviewId }: ToggleButtonProps) { | ||
| const isOpen = useReviewCardStore((state) => state.allReviews[reviewId]?.isOpen); | ||
| const toggleReviewOpen = useReviewCardStore((state) => state.toggleReviewOpen); | ||
| return ( | ||
| <Button | ||
| size={null} //๋ฒํผ ๋ํดํธ ๋ฎ์ด์์ฐ๊ธฐ | ||
| width={null} | ||
| variant='onlyCancel' | ||
| onClick={() => toggleReviewOpen(reviewId)} | ||
| className={cn( | ||
| 'border-0 mx-auto [&_svg]:w-[30px] [&_svg]:h-[30px] block transition-all duration-500 ease-in-out mt-[-30px]', | ||
| { | ||
| 'scale-y-[-1] mt-0': isOpen, | ||
| }, | ||
| )} | ||
| > | ||
| <ShowMoreBtn /> | ||
| </Button> |
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.
ํฉ์ฑ ์ปดํฌ๋ํธ๋ก ๋ณ๊ฒฝํ๋ ์ปดํฌ๋ํธ์ ์ญํ ๊ตฌ๋ถ์ด ์ ๋์ด๋ณด์ด๋ค์
llmojoll
left a comment
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.
๊ณ ์ํ์
จ์ต๋๋ค ์ ์ ์์ฑ๋์ด ๊ฐ๋ ๋๋์ด ๋๋ค์
๋ง์ํ์ assetsํด๋๋ ์ ๋ ๋ฃจํธ์ ๋ค ๋ฃ์ด๋์... ์ ๋ฆฌํ๊ธด ํด์ผ ํ ๊ฒ ๊ฐ์ต๋๋ค
ํ
์ผ์๋๋ ์ ๋ ์ด๊ฒ์ ๊ฒ ๋ณต์กํ๊ฒ ์์ฌ์๋๋ฐ์ ์ด๋์ ๋ ํต์ผ์ ํด์ผ ํ๋ค๊ณ ์๊ฐํฉ๋๋ค
| <ReviewCard> | ||
| <ReviewCard.UserHeader | ||
| userIcon={<UserDefaultImg className='size-10 md:size-16' />} | ||
| reviewId={id} | ||
| > | ||
| <LikeButton isLike={false} /> | ||
| <Kebab /> | ||
| </ReviewCard.UserHeader> | ||
| <ReviewCard.TagAndRating reviewId={id}></ReviewCard.TagAndRating> | ||
| <ReviewCard.ReviewBody | ||
| reviewId={id} | ||
| flavorSliderSlot={ | ||
| <FlavorSliderList | ||
| lightBold={lightBold} | ||
| smoothTannic={smoothTannic} | ||
| drySweet={drySweet} | ||
| softAcidic={softAcidic} | ||
| /> | ||
| } | ||
| ></ReviewCard.ReviewBody> | ||
| <ReviewCard.ToggleButton reviewId={id} /> | ||
| </ReviewCard> |
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.
props๋ฅผ ๋ง์ด ์ค์ฌ์ ๊น๋ํด๋ณด์ด๋ค์! ๊ตฟ๊ตฟ ๐
| className='mb-10 md:mb-[60px] md:px-[63px] xl:px-0 w-full xl:max-w-[280px] mx-auto xl:mx-0 order-1 xl:order-2 | ||
| flex flex-col md:flex-row md:gap-20 xl:gap-0 xl:flex-col xl:relative' |
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.
ํด๋์ค๊ฐ ๋๋ฌด ๊ธธ์ด์ ธ์ ๋ณ์๋ก ๋นผ๋ ์ข์ ๊ฒ ๊ฐ์ต๋๋ค!
| <meta property='og:image' content={defaultOGImage} /> | ||
| <meta property='og:url' content={BASE_URL} /> |
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.
๋ฉํํ๊ทธ ์ด๋ฏธ์ง ์ค์ ํด์ฃผ์ ๋ถ๋ถ ํ์ธํ์ต๋๋ค
| //use-sync-external-store ํจํค์ง ์ค์น ํ useStoreWithEqualityFn์ผ๋ก ํ์ ์ง์ ํด์ผ shallow์ ๋๋ก ์ธ์ | ||
| //-> ์ด๊ฑฐ ์ธ์ ํจํค์ง ์ค์น ์ํ๋ ๋ฐฉ์์ผ๋ก ์ด๊ฒ์ ๊ฒ ํด๋ดค๋๋ฐ ๋๋ฌด์ง ๋ชป ์ฐพ๊ฒ ๋ค์ ใ | ||
| //-> ์ผ๋จ ์ฐ๊ธดํ๋๋ฐ ์ ์ด ํจํค์ง๊ฐ ํ์ํ์ง ์ ๋ชจ๋ฅด๊ฒ ์ต๋๋ค. ์์ ์ ๊ทธ๋ฅ ๋ฆฌ์กํธ+js๋ก๋ง ํ์ ๋๋ ์์ด๋ ์ ์ธ์ํ๋ ๊ฒ ๊ฐ์๋ฐ... | ||
|
|
||
| //์์ํ์ === ๋น๊ต/ ๊ฐ์ฒด,๋ฐฐ์ด ์์ ๋น๊ต | ||
| const useReviewCardStore = <T>(selector: (state: ReviewStates) => T): T => | ||
| useStoreWithEqualityFn(reviewStore, selector, shallow); | ||
|
|
||
| export default useReviewCardStore; |
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.
์ด๋ถ๋ถ์ ํฉ์ฑ ์ปดํฌ๋ํธ ๋ง๋ค๋ฉด์ ํ๋ฒ ํ์ธํด๋ณด๊ฒ ์ต๋๋ค!
๐ฆ Pull Request
https://whyne-fe-git-fork-626-ju-feature-wineid-626-jus-projects.vercel.app/wines/123
๐ ์์ฝ(Summary)
์์ธ ์์ธํ์ด์ง ui ๊ตฌํ์ ๋๋ค.
api ์ฐ๊ฒฐ์ ์์ง ์๋์ด ์์ด์
๐ฌ ๊ณต์ ์ฌํญ to ๋ฆฌ๋ทฐ์ด
๊ณต์ฉ ์ปดํฌ์ ์๋ ๋ฆฌ๋ทฐ ์นด๋ ์ ๋ง ์ฐ๋ ๊ฒ ๊ฐ์๋ฐ
์์น ์กฐ์ ์ด ํ์ํ ๋ถ๋ถ์ด ์์ด์ ์กฐ๊ธ ๊ฑด๋๋ ค๋์ต๋๋ค.
ํน์ ๋ค๋ฅธ ๋ถ๋ค ์ฐ์ ์ผ ํ๋ฉด ๋ฏธ๋ฆฌ ๋ง์ํด์ฃผ์ธ์
assets ํด๋ ์์ ์ฐ๋ ํ์ด์ง ๋ณ๋ก ํด๋๋ฅผ ๋ถ๋ฆฌํด์ผ ํ ๊น์?
์ผ๋จ์ ๋ฃจํธ์๋ค ๋๋๋ฐ ๊ธฐ์กด์ ์๋ icons ์์ ๋ฃ์์ง ์๋๋ฉด ์๋ก ํด๋๋ฅผ ๋ง๋ค์ง ๊ฒฐ์ ํด์ฃผ์๋ฉด ๋ ๊ฒ ๊ฐ์ต๋๋ค.
ํ ์ผ์๋์ ๋ฏธ๋ฆฌ ์ ์ ๋์ง ์์์ง๋ง ์์์๋ ํ๊ธฐ๋์ด ์๋
-> ex) margin-bottom: 6.5px, margin-bottm:22px, width ๊ฐ๋ค ๋ฑ๋ฑ
๋๋ฌธ์ [ ] ํ๊ธฐ๋ฒ๊ณผ ๊ฐ์ด ์ฐ๋ค๋ณด๋ ๋ง์ด ์ง์ ๋ถํด์ง ๊ฒ ๊ฐ์ต๋๋ค...
์ ๋ฒ์ ๋ฉํ ๋๊ป์ ๋ง์ํด์ฃผ์ ๋งค์ง๋๋ฒ๋ฅผ -> ์์๋ก ๋ถ๋ฆฌํ๊ธฐ์๋ ์ข ๋ฅ๊ฐ ๋๋ฌด ๋ง๊ณ
์ด๋ ์์์ ํด๋น ๊ฐ์ด ์ ์ฉ๋๋์ง ํ์ ํ๋ ๊ฒ ์ด๋ ค์ ์ง ๊ฒ ๊ฐ์๋ฐ
์ด์ผ๊ธฐํด๋ณด๋ฉด ์ข์ ๊ฒ ๊ฐ์ต๋๋ค.
1์ฐจ qa ๋ฐ์
mb-10 md:mb-[60px]
๐๏ธ ๊ด๋ จ ์ด์
๐ธ ์คํฌ๋ฆฐ์ท
โ ์ฒดํฌ๋ฆฌ์คํธ