From abbe048083d56e3cbd31cd5c2e976731c8f36798 Mon Sep 17 00:00:00 2001 From: Jared Pereira Date: Mon, 10 Nov 2025 18:44:27 -0500 Subject: [PATCH] hide avatar if none --- .../[rkey]/PublishBskyPostBlock.tsx | 31 +++++++++++-------- .../Blocks/BlueskyPostBlock/BlueskyEmbed.tsx | 12 ++++--- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/app/lish/[did]/[publication]/[rkey]/PublishBskyPostBlock.tsx b/app/lish/[did]/[publication]/[rkey]/PublishBskyPostBlock.tsx index 75855d56..914c082e 100644 --- a/app/lish/[did]/[publication]/[rkey]/PublishBskyPostBlock.tsx +++ b/app/lish/[did]/[publication]/[rkey]/PublishBskyPostBlock.tsx @@ -60,11 +60,13 @@ export const PubBlueskyPostBlock = (props: { {post.author && record && ( <>
- {`${post.author?.displayName}'s + {post.author.avatar && ( + {`${post.author?.displayName}'s + )}
{post.author?.displayName} @@ -122,14 +124,17 @@ export const PubBlueskyPostBlock = (props: { const ClientDate = (props: { date?: string }) => { let pageLoaded = useInitialPageLoad(); - const formattedDate = useLocalizedDate(props.date || new Date().toISOString(), { - month: "short", - day: "numeric", - year: "numeric", - hour: "numeric", - minute: "numeric", - hour12: true, - }); + const formattedDate = useLocalizedDate( + props.date || new Date().toISOString(), + { + month: "short", + day: "numeric", + year: "numeric", + hour: "numeric", + minute: "numeric", + hour12: true, + }, + ); if (!pageLoaded) return null; diff --git a/components/Blocks/BlueskyPostBlock/BlueskyEmbed.tsx b/components/Blocks/BlueskyPostBlock/BlueskyEmbed.tsx index 214575bc..68873ded 100644 --- a/components/Blocks/BlueskyPostBlock/BlueskyEmbed.tsx +++ b/components/Blocks/BlueskyPostBlock/BlueskyEmbed.tsx @@ -125,11 +125,13 @@ export const BlueskyEmbed = (props: { className={`flex flex-col gap-1 relative w-full overflow-hidden sm:p-3 p-2 text-xs block-border`} >
- {`${record.author?.displayName}'s + {record.author.avatar && ( + {`${record.author?.displayName}'s + )}
{record.author?.displayName}
-- 2.51.2