Skip to content

Commit 8a91495

Browse files
committed
feat: update UnifiedContentCard to display author username conditionally and prevent layout shift with scrollbar-gutter in globals.css
1 parent 0461ac4 commit 8a91495

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

components/UnifiedContentCard/UnifiedContentCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ const UnifiedContentCard = ({
243243
>
244244
{/* Meta info row */}
245245
<div className="mb-1.5 flex flex-wrap items-center gap-x-1.5 gap-y-1 text-xs text-neutral-500 dark:text-neutral-400">
246-
{/* Author/Source info - show author for any content type with author */}
247-
{author ? (
246+
{/* Author/Source info - show author for content with valid author username */}
247+
{author?.username ? (
248248
<Link
249249
href={`/${author.username}`}
250250
className="flex items-center gap-1.5 hover:text-neutral-700 dark:hover:text-neutral-200"

styles/globals.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
@tailwind base;
22

3+
html {
4+
/* Prevent layout shift when scrollbar appears/disappears */
5+
scrollbar-gutter: stable;
6+
}
7+
38
body {
49
@apply bg-neutral-100 text-neutral-900 dark:bg-black dark:text-white;
510
}

0 commit comments

Comments
 (0)