Skip to content

Commit

Permalink
feat: 댓글이 없는 경우 ui 처리
Browse files Browse the repository at this point in the history
  • Loading branch information
xodms0309 committed Oct 16, 2023
1 parent ff62d0e commit 778e9f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/components/Recipe/CommentList/CommentList.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Heading, Spacing } from '@fun-eat/design-system';
import { Heading, Spacing, Text, theme } from '@fun-eat/design-system';
import { useRef } from 'react';

import CommentItem from '../CommentItem/CommentItem';
Expand All @@ -24,6 +24,7 @@ const CommentList = ({ recipeId }: CommentListProps) => {
댓글 ({comments.length}개)
</Heading>
<Spacing size={12} />
{comments.length === 0 && <Text color={theme.textColors.info}>꿀조합의 첫번째 댓글을 달아보세요!</Text>}
{comments.map((comment) => (
<CommentItem key={comment.id} recipeComment={comment} />
))}
Expand Down

0 comments on commit 778e9f7

Please sign in to comment.