Skip to content

Commit

Permalink
fix(member): hide writerId in community collect when in anonymous s…
Browse files Browse the repository at this point in the history
…tate (#86)
  • Loading branch information
gwansikk committed Apr 6, 2024
1 parent a8033c2 commit 9a1e63f
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import Section from '@components/common/Section/Section';
import { PATH_FINDER } from '@constants/path';
import type { BoardItem } from '@type/board';
import { titleToCategory } from '@utils/community';
import { categoryToTitle } from '@utils/community';
import { formattedDate } from '@utils/date';
import { LiaCommentSolid } from 'react-icons/lia';
import { Link } from 'react-router-dom';
import type { BoardItem } from '@type/board';

interface CommunityBoardCollectSectionProps {
data: BoardItem[];
Expand Down Expand Up @@ -33,11 +33,11 @@ const CommunityBoardCollectSection = ({
}) => (
<Link
key={id}
to={PATH_FINDER.COMMUNITY_POST(titleToCategory(category), id)}
to={PATH_FINDER.COMMUNITY_POST(category, id)}
className="flex items-center gap-4 p-2 text-sm transition-colors border rounded-lg hover:border-clab-main-light text-nowrap"
>
<p className="flex items-center justify-center flex-shrink-0 font-semibold bg-gray-100 rounded-lg size-12">
{category}
{categoryToTitle(category)}
</p>
<div className="flex flex-col min-w-0 grow">
<p className="font-semibold truncate">{title}</p>
Expand All @@ -49,7 +49,7 @@ const CommunityBoardCollectSection = ({
</p>
<div className="flex flex-col">
<p>
{writerName} ({writerId})
{writerName} {writerId && `(${writerId})`}
</p>
<p>{formattedDate(createdAt)}</p>
</div>
Expand Down

0 comments on commit 9a1e63f

Please sign in to comment.