From 35162c1e48eb7f4c6bc3e98ac9bf8977e23c0830 Mon Sep 17 00:00:00 2001 From: hae-on Date: Wed, 24 Jul 2024 22:26:28 +0900 Subject: [PATCH 1/5] =?UTF-8?q?chore:=20=EC=A2=8B=EC=95=84=EC=9A=94=20?= =?UTF-8?q?=EA=B0=92=20false=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mocks/data/recipeDetail.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mocks/data/recipeDetail.json b/src/mocks/data/recipeDetail.json index 8d17e8ee..7a575709 100644 --- a/src/mocks/data/recipeDetail.json +++ b/src/mocks/data/recipeDetail.json @@ -39,6 +39,6 @@ ], "totalPrice": 7000, "favoriteCount": 153, - "favorite": true, + "favorite": false, "createdAt": "2023-08-02T13:43:06.379389" } From aa607a6f461b911d509bd9aad37dee9527a83cf1 Mon Sep 17 00:00:00 2001 From: hae-on Date: Wed, 24 Jul 2024 22:26:52 +0900 Subject: [PATCH 2/5] =?UTF-8?q?refactor:=20=EC=A2=8B=EC=95=84=EC=9A=94=20?= =?UTF-8?q?=EB=B9=88=20=EB=B2=84=ED=8A=BC=20svg=20to=20png?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/heart-empty.png | Bin 0 -> 8151 bytes .../RecipeFavoriteButton.tsx | 9 +++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 src/assets/heart-empty.png diff --git a/src/assets/heart-empty.png b/src/assets/heart-empty.png new file mode 100644 index 0000000000000000000000000000000000000000..c1ec4a102a22be9624a52ff79eb7ae0741c69ddc GIT binary patch literal 8151 zcmV;|A1L67P)@~0drDELIAGL9O(c600d`2O+f$vv5yPjQ!4=CS^Mx8BP9_{TqX#~gEv+q`*mX2_5s$*57I68k=} zXUikJ;)*L0Lqe&O^fQJ26T6m)P5I?7e_6h#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RecipeFavoriteButton/RecipeFavoriteButton.tsx index 7c55edea..cc3f6a48 100644 --- a/src/components/Recipe/RecipeFavoriteButton/RecipeFavoriteButton.tsx +++ b/src/components/Recipe/RecipeFavoriteButton/RecipeFavoriteButton.tsx @@ -1,5 +1,6 @@ import { container } from './recipeFavoriteButton.css'; +import HeartEmpty from '@/assets/heart-empty.png'; import { SvgIcon, Text } from '@/components/Common'; import { useTimeout } from '@/hooks/common'; import { useMemberQuery } from '@/hooks/queries/members'; @@ -27,11 +28,15 @@ const RecipeFavoriteButton = ({ recipeId, favorite, favoriteCount }: RecipeFavor
{member ? ( ) : (
- + 좋아요
)} From ef09fc761bec4211fbde4b7022176a9e28baa827 Mon Sep 17 00:00:00 2001 From: hae-on Date: Wed, 24 Jul 2024 22:27:12 +0900 Subject: [PATCH 3/5] =?UTF-8?q?chore:=20=EC=BF=A0=ED=82=A4=20=EA=B0=92=20?= =?UTF-8?q?=EC=9E=88=EC=9D=84=20=EB=95=8C=EB=A7=8C=20detail=EB=A1=9C=20?= =?UTF-8?q?=EB=84=98=EC=96=B4=EA=B0=80=EB=8A=94=20=EB=A1=9C=EC=A7=81=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mocks/handlers/recipeHandlers.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mocks/handlers/recipeHandlers.ts b/src/mocks/handlers/recipeHandlers.ts index 14019cef..99dfa10d 100644 --- a/src/mocks/handlers/recipeHandlers.ts +++ b/src/mocks/handlers/recipeHandlers.ts @@ -7,11 +7,11 @@ import mockRecipes from '../data/recipes.json'; export const recipeHandlers = [ rest.get('/api/recipes/:recipeId', (req, res, ctx) => { - const { mockSessionId } = req.cookies; + // const { mockSessionId } = req.cookies; - if (!mockSessionId) { - return res(ctx.status(401)); - } + // if (!mockSessionId) { + // return res(ctx.status(401)); + // } return res(ctx.status(200), ctx.json(recipeDetail), ctx.delay(1000)); }), From 8335a66f5dbbdfa71377cafed2ecdb8dad7bae5c Mon Sep 17 00:00:00 2001 From: hae-on Date: Wed, 24 Jul 2024 22:27:49 +0900 Subject: [PATCH 4/5] =?UTF-8?q?refactor:=20border=20=EA=B0=92=20=EB=B6=80?= =?UTF-8?q?=EC=97=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Common/CategoryItem/CategoryItem.tsx | 2 +- src/components/Common/CategoryItem/categoryItem.css.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Common/CategoryItem/CategoryItem.tsx b/src/components/Common/CategoryItem/CategoryItem.tsx index c71af699..7add0319 100644 --- a/src/components/Common/CategoryItem/CategoryItem.tsx +++ b/src/components/Common/CategoryItem/CategoryItem.tsx @@ -46,7 +46,7 @@ const CategoryItem = ({ >
Date: Wed, 24 Jul 2024 22:31:01 +0900 Subject: [PATCH 5/5] =?UTF-8?q?refactor:=20count=20=EC=9E=88=EC=9D=84=20?= =?UTF-8?q?=EB=95=8C=EB=A7=8C=20margin=20=EB=B6=80=EC=97=AC=EB=90=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RecipeFavoriteButton/RecipeFavoriteButton.tsx | 13 +++++++++---- .../recipeFavoriteButton.css.ts | 5 ++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/components/Recipe/RecipeFavoriteButton/RecipeFavoriteButton.tsx b/src/components/Recipe/RecipeFavoriteButton/RecipeFavoriteButton.tsx index cc3f6a48..de77e477 100644 --- a/src/components/Recipe/RecipeFavoriteButton/RecipeFavoriteButton.tsx +++ b/src/components/Recipe/RecipeFavoriteButton/RecipeFavoriteButton.tsx @@ -1,4 +1,4 @@ -import { container } from './recipeFavoriteButton.css'; +import { container, countWrapper } from './recipeFavoriteButton.css'; import HeartEmpty from '@/assets/heart-empty.png'; import { SvgIcon, Text } from '@/components/Common'; @@ -39,9 +39,14 @@ const RecipeFavoriteButton = ({ recipeId, favorite, favoriteCount }: RecipeFavor 좋아요
)} - - {favoriteCount} - + + {favoriteCount && ( +
+ + {favoriteCount} + +
+ )}
); }; diff --git a/src/components/Recipe/RecipeFavoriteButton/recipeFavoriteButton.css.ts b/src/components/Recipe/RecipeFavoriteButton/recipeFavoriteButton.css.ts index 5f56bc18..5f76aa4f 100644 --- a/src/components/Recipe/RecipeFavoriteButton/recipeFavoriteButton.css.ts +++ b/src/components/Recipe/RecipeFavoriteButton/recipeFavoriteButton.css.ts @@ -3,5 +3,8 @@ import { style } from '@vanilla-extract/css'; export const container = style({ display: 'flex', alignItems: 'center', - gap: 6, +}); + +export const countWrapper = style({ + marginLeft: 6, });