diff --git a/src/components/post/CafeDetail.tsx b/src/components/post/CafeDetail.tsx index 6d3b994..06f13f5 100644 --- a/src/components/post/CafeDetail.tsx +++ b/src/components/post/CafeDetail.tsx @@ -10,7 +10,9 @@ const CafeDetail = ({ menu, shot, posts = false, - onClick + onClick, + intensity, + size }: CafeDetailTypes) => { const CafeDetailProps = { brand, @@ -18,7 +20,9 @@ const CafeDetail = ({ menu, shot, posts, - onClick + onClick, + intensity, + size }; return (
diff --git a/src/components/post/CafeDetailContent.tsx b/src/components/post/CafeDetailContent.tsx index 29781ab..bea89e3 100644 --- a/src/components/post/CafeDetailContent.tsx +++ b/src/components/post/CafeDetailContent.tsx @@ -27,8 +27,13 @@ const CafeDetailContent = ({ onClick, menu, caffeine, - shot + shot, + intensity, + size }: CafeDetailContent) => { + const mild = intensity === '연하게'; + const base = intensity === '기본' && shot === 0; + return ( <>
@@ -38,9 +43,9 @@ const CafeDetailContent = ({
- {`${menu} ${shot !== '0' ? `(+${shot}` : ''}${ - shot !== '0' ? '샷)' : '' - }`} + {mild && `${menu} (${intensity}, ${size})`} + {!mild && !base && `${menu} (+${shot}샷, ${size})`} + {!mild && base && `${menu} (${intensity}, ${size})`}
{!mini && including} diff --git a/src/components/post/CaffeineInfo.tsx b/src/components/post/CaffeineInfo.tsx index fd1332a..73b1196 100644 --- a/src/components/post/CaffeineInfo.tsx +++ b/src/components/post/CaffeineInfo.tsx @@ -9,12 +9,16 @@ const CaffeineInfo = ({ brand, menu, caffeine, - shot + shot, + intensity, + size }: { brand: string; menu: string; caffeine: number; shot: number; + intensity: string; + size: string; }) => { return ( @@ -25,6 +29,8 @@ const CaffeineInfo = ({ caffeine={caffeine} menu={menu} shot={shot} + intensity={intensity} + size={size} /> ); diff --git a/src/components/post/PostDetail.tsx b/src/components/post/PostDetail.tsx index 3dc2edc..375bf7c 100644 --- a/src/components/post/PostDetail.tsx +++ b/src/components/post/PostDetail.tsx @@ -119,6 +119,8 @@ const PostDetail = ({ postNum }: { postNum: string }) => { menu={postData.data.menu} caffeine={postData.data.caffeine} shot={postData.data.shot} + intensity={postData.data.intensity} + size={postData.data.size} />
diff --git a/src/types/types.ts b/src/types/types.ts index f218ac2..0a720b7 100644 --- a/src/types/types.ts +++ b/src/types/types.ts @@ -253,6 +253,8 @@ export interface CafeDetailTypes { menu?: string; shot?: string | number; posts?: boolean; + intensity: string; + size: string; onClick?: () => void; }