We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a7eaa7 commit f71d9feCopy full SHA for f71d9fe
apps/docs/app/(home)/blog/[slug]/page.tsx
@@ -179,11 +179,15 @@ export default async function PostPage({
179
</Avatar>
180
))}
181
</div>
182
- <Link href={post.authors[0]?.socials[0]?.url ?? undefined} target='_blank' rel='noopener noreferrer'>
183
- <span>
184
- {post.authors[0].name}
185
- </span>
186
- </Link>
+ {post.authors[0]?.socials?.[0]?.url ? (
+ <Link href={post.authors[0].socials[0].url} target='_blank' rel='noopener noreferrer'>
+ <span>
+ {post.authors[0].name}
+ </span>
187
+ </Link>
188
+ ) : (
189
+ <span>{post.authors[0].name}</span>
190
+ )}
191
{post.authors.length > 1 && (
192
<span> +{post.authors.length - 1}</span>
193
)}
0 commit comments