Skip to content

Commit

Permalink
feat: show tags on permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mary-ext committed Dec 9, 2023
1 parent c837133 commit a3e7293
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/com/components/views/PermalinkPost.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import ChatBubbleOutlinedIcon from '../../icons/outline-chat-bubble.tsx';
import FavoriteIcon from '../../icons/baseline-favorite.tsx';
import FavoriteOutlinedIcon from '../../icons/outline-favorite.tsx';
import MoreHorizIcon from '../../icons/baseline-more-horiz.tsx';
import PoundIcon from '~/com/icons/baseline-pound.tsx';
import RepeatIcon from '../../icons/baseline-repeat.tsx';
import ShareIcon from '../../icons/baseline-share.tsx';

Expand Down Expand Up @@ -98,6 +99,15 @@ const PermalinkPost = (props: PermalinkPostProps) => {
</PostEmbedWarning>
)}

<div class="my-3 flex flex-wrap gap-1.5 text-sm empty:hidden">
{record().tags?.map((tag) => (
<div class="flex min-w-0 items-center gap-1 rounded-full bg-secondary/30 px-2 leading-6">
<PoundIcon />
<span class="overflow-hidden text-ellipsis whitespace-nowrap">{tag}</span>
</div>
))}
</div>

<div class="my-3">
<span class="text-sm text-muted-fg">{formatAbsDateTime(record().createdAt)}</span>
</div>
Expand Down

0 comments on commit a3e7293

Please sign in to comment.