Skip to content

Commit

Permalink
Fix: correct cafe detail content for trend card
Browse files Browse the repository at this point in the history
  • Loading branch information
hookor authored and cuconveniencestore committed Aug 29, 2024
1 parent 2af47c1 commit b80e533
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
11 changes: 5 additions & 6 deletions src/components/post/CafeDetailContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ interface CafeDetailContent extends CafeDetailTypes {
}

const { unit, including, is } = COFFEE_TEXTS;
const { mgLabel } = TEXT;

const CafeDetailContent = ({
mini = false,
Expand All @@ -43,15 +42,15 @@ const CafeDetailContent = ({
<div
className={CaffeineDetail}
onClick={onClick}>
{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}샷)`}
<br />
{!mini && including}
<span className={ColorMain}>
{caffeine}
{!mini && unit}
{mini && mgLabel}
{unit}
</span>
{!mini && is}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/post/CaffeineInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const CaffeineInfo = ({
caffeine: number;
shot: number;
intensity: string;
size: string;
size: number;
}) => {
return (
<Container className={cx(Flex, Align)}>
Expand Down
4 changes: 2 additions & 2 deletions src/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ export interface CafeDetailTypes {
menu?: string;
shot?: string | number;
posts?: boolean;
intensity: string;
size: number;
intensity?: string;
size?: number;
onClick?: () => void;
}

Expand Down

0 comments on commit b80e533

Please sign in to comment.