Fix reviewer name priority to use live profile data first
Changed fallback order from: reviewer_name || profiles.name || 'Anonymous' To: profiles.name || reviewer_name || 'Anonymous' This ensures: 1. Live profile name is always shown (current data) 2. Falls back to stored reviewer_name if profile deleted 3. Shows "Anonymous" as last resort Fixes issue where name changes don't reflect on old reviews 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -75,7 +75,7 @@ export function ProductReviews({ productId, type }: ProductReviewsProps) {
|
|||||||
rating={review.rating}
|
rating={review.rating}
|
||||||
title={review.title}
|
title={review.title}
|
||||||
body={review.body}
|
body={review.body}
|
||||||
authorName={review.reviewer_name || review.profiles?.name || 'Anonymous'}
|
authorName={review.profiles?.name || review.reviewer_name || 'Anonymous'}
|
||||||
date={review.created_at}
|
date={review.created_at}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export function TestimonialsSection() {
|
|||||||
rating={review.rating}
|
rating={review.rating}
|
||||||
title={review.title}
|
title={review.title}
|
||||||
body={review.body}
|
body={review.body}
|
||||||
authorName={review.reviewer_name || review.profiles?.name || 'Anonymous'}
|
authorName={review.profiles?.name || review.reviewer_name || 'Anonymous'}
|
||||||
date={review.created_at}
|
date={review.created_at}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
|||||||
Reference in New Issue
Block a user