mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 12:11:12 -05:00
Improve avatar display to ensure consistency across the application
Replace default Avatar component with a new UserAvatar component, ensuring consistent rendering of user avatars and fallbacks in moderation queue and review lists. Replit-Commit-Author: Agent Replit-Commit-Session-Id: ef7037e7-a631-48a2-94d1-9a4b52d7c35a Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7cdf4e95-3f41-4180-b8e3-8ef56d032c0e/ef7037e7-a631-48a2-94d1-9a4b52d7c35a/OwE1IU0
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
|
||||
import { UserAvatar } from '@/components/ui/user-avatar';
|
||||
import { Star, ThumbsUp, Calendar, MapPin } from 'lucide-react';
|
||||
import { supabase } from '@/integrations/supabase/client';
|
||||
import { ReportButton } from '@/components/moderation/ReportButton';
|
||||
@@ -129,12 +129,13 @@ export function ReviewsList({ entityType, entityId, entityName }: ReviewsListPro
|
||||
<Card key={review.id}>
|
||||
<CardContent className="p-6">
|
||||
<div className="flex items-start gap-4">
|
||||
<Avatar className="w-12 h-12">
|
||||
<AvatarImage src={review.profiles?.avatar_url || ''} />
|
||||
<AvatarFallback>
|
||||
{(review.profiles?.display_name || review.profiles?.username || 'U').charAt(0).toUpperCase()}
|
||||
</AvatarFallback>
|
||||
</Avatar>
|
||||
<UserAvatar
|
||||
key={review.profiles?.avatar_url || `review-${review.id}`}
|
||||
avatarUrl={review.profiles?.avatar_url}
|
||||
fallbackText={review.profiles?.display_name || review.profiles?.username || 'U'}
|
||||
size="lg"
|
||||
className="w-12 h-12"
|
||||
/>
|
||||
|
||||
<div className="flex-1 space-y-3">
|
||||
<div className="flex items-center justify-between">
|
||||
|
||||
Reference in New Issue
Block a user