From 891faa73f06c33017d11ed256a9988819d782e66 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sun, 21 Dec 2025 15:30:01 +0000 Subject: [PATCH] Changes --- src/components/reviews/ProductReviews.tsx | 2 +- src/components/reviews/TestimonialsSection.tsx | 2 +- src/pages/admin/AdminReviews.tsx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/reviews/ProductReviews.tsx b/src/components/reviews/ProductReviews.tsx index 5cad30a..be15a47 100644 --- a/src/components/reviews/ProductReviews.tsx +++ b/src/components/reviews/ProductReviews.tsx @@ -29,7 +29,7 @@ export function ProductReviews({ productId, type }: ProductReviewsProps) { const fetchReviews = async () => { let query = supabase .from('reviews') - .select('id, rating, title, body, created_at, profiles (full_name)') + .select('id, rating, title, body, created_at, profiles:user_id (full_name)') .eq('is_approved', true); if (productId) { diff --git a/src/components/reviews/TestimonialsSection.tsx b/src/components/reviews/TestimonialsSection.tsx index c2fa7b3..4c16d3b 100644 --- a/src/components/reviews/TestimonialsSection.tsx +++ b/src/components/reviews/TestimonialsSection.tsx @@ -22,7 +22,7 @@ export function TestimonialsSection() { const fetchReviews = async () => { const { data } = await supabase .from('reviews') - .select('id, rating, title, body, created_at, profiles (full_name)') + .select('id, rating, title, body, created_at, profiles:user_id (full_name)') .eq('is_approved', true) .order('created_at', { ascending: false }) .limit(6); diff --git a/src/pages/admin/AdminReviews.tsx b/src/pages/admin/AdminReviews.tsx index 24f9f4b..8324e66 100644 --- a/src/pages/admin/AdminReviews.tsx +++ b/src/pages/admin/AdminReviews.tsx @@ -44,8 +44,8 @@ export default function AdminReviews() { .from("reviews") .select(` *, - profiles (full_name, email), - products (title) + profiles:user_id (full_name, email), + products:product_id (title) `) .order("created_at", { ascending: false });