This commit is contained in:
gpt-engineer-app[bot]
2025-12-21 15:30:01 +00:00
parent 2906c94c14
commit 891faa73f0
3 changed files with 4 additions and 4 deletions

View File

@@ -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) {

View File

@@ -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);

View File

@@ -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 });