mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-26 12:47:00 -05:00
Fix: Resolve remaining TypeScript errors
This commit is contained in:
@@ -23,7 +23,7 @@ export default function BlogPost() {
|
||||
const query = supabase
|
||||
.from('blog_posts')
|
||||
.select('*, profiles!inner(username, display_name, avatar_url, avatar_image_id)')
|
||||
.eq('slug', slug)
|
||||
.eq('slug', slug || '')
|
||||
.eq('status', 'published')
|
||||
.single();
|
||||
|
||||
@@ -41,8 +41,8 @@ export default function BlogPost() {
|
||||
useOpenGraph({
|
||||
title: post?.title || '',
|
||||
description: post?.content?.substring(0, 160),
|
||||
imageUrl: post?.featured_image_url,
|
||||
imageId: post?.featured_image_id,
|
||||
imageUrl: post?.featured_image_url ?? undefined,
|
||||
imageId: post?.featured_image_id ?? undefined,
|
||||
type: 'article',
|
||||
enabled: !!post
|
||||
});
|
||||
@@ -106,14 +106,14 @@ export default function BlogPost() {
|
||||
<div className="flex items-center justify-between mb-8 pb-6 border-b">
|
||||
<div className="flex items-center gap-3">
|
||||
<Avatar className="w-12 h-12">
|
||||
<AvatarImage src={post.profiles.avatar_url} />
|
||||
<AvatarImage src={post.profiles.avatar_url ?? undefined} />
|
||||
<AvatarFallback>
|
||||
{post.profiles.display_name?.[0] || post.profiles.username[0]}
|
||||
</AvatarFallback>
|
||||
</Avatar>
|
||||
<div>
|
||||
<p className="font-medium">
|
||||
{post.profiles.display_name || post.profiles.username}
|
||||
{post.profiles.display_name ?? post.profiles.username}
|
||||
</p>
|
||||
<div className="flex items-center gap-3 text-sm text-muted-foreground">
|
||||
<div className="flex items-center gap-1">
|
||||
|
||||
Reference in New Issue
Block a user