From b80e53325a9df186dbd1fedd9db5b211f6414019 Mon Sep 17 00:00:00 2001 From: hookor Date: Thu, 29 Aug 2024 00:50:52 +0900 Subject: [PATCH] Fix: correct cafe detail content for trend card --- src/components/post/CafeDetailContent.tsx | 11 +++++------ src/components/post/CaffeineInfo.tsx | 2 +- src/types/types.ts | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/components/post/CafeDetailContent.tsx b/src/components/post/CafeDetailContent.tsx index bea89e3..a97d837 100644 --- a/src/components/post/CafeDetailContent.tsx +++ b/src/components/post/CafeDetailContent.tsx @@ -18,7 +18,6 @@ interface CafeDetailContent extends CafeDetailTypes { } const { unit, including, is } = COFFEE_TEXTS; -const { mgLabel } = TEXT; const CafeDetailContent = ({ mini = false, @@ -43,15 +42,15 @@ const CafeDetailContent = ({
- {mild && `${menu} (${intensity}, ${size})`} - {!mild && !base && `${menu} (+${shot}샷, ${size})`} - {!mild && base && `${menu} (${intensity}, ${size})`} + {!mini && mild && `${menu} (${intensity}, ${size})`} + {!mini && !mild && !base && `${menu} (+${shot}샷, ${size})`} + {!mini && !mild && base && `${menu} (${intensity}, ${size})`} + {mini && `${menu} (+${shot}샷)`}
{!mini && including} {caffeine} - {!mini && unit} - {mini && mgLabel} + {unit} {!mini && is}
diff --git a/src/components/post/CaffeineInfo.tsx b/src/components/post/CaffeineInfo.tsx index 73b1196..0131d3a 100644 --- a/src/components/post/CaffeineInfo.tsx +++ b/src/components/post/CaffeineInfo.tsx @@ -18,7 +18,7 @@ const CaffeineInfo = ({ caffeine: number; shot: number; intensity: string; - size: string; + size: number; }) => { return ( diff --git a/src/types/types.ts b/src/types/types.ts index 3f4316a..0a68465 100644 --- a/src/types/types.ts +++ b/src/types/types.ts @@ -251,8 +251,8 @@ export interface CafeDetailTypes { menu?: string; shot?: string | number; posts?: boolean; - intensity: string; - size: number; + intensity?: string; + size?: number; onClick?: () => void; }