diff --git a/src/components/reviews/ProductReviews.tsx b/src/components/reviews/ProductReviews.tsx index b32ffdd..1c46690 100644 --- a/src/components/reviews/ProductReviews.tsx +++ b/src/components/reviews/ProductReviews.tsx @@ -28,8 +28,6 @@ export function ProductReviews({ productId, type }: ProductReviewsProps) { }, [productId, type]); const fetchReviews = async () => { - console.log('fetchReviews called - productId:', productId, 'type:', type); - let query = supabase .from('reviews') .select('id, rating, title, body, created_at, reviewer_name, profiles!user_id (name)') @@ -41,10 +39,7 @@ export function ProductReviews({ productId, type }: ProductReviewsProps) { query = query.eq('type', type); } - const { data, error } = await query.order('created_at', { ascending: false }).limit(3); - - console.log('Raw reviews data:', data); - console.log('Error:', error); + const { data } = await query.order('created_at', { ascending: false }).limit(3); if (data && data.length > 0) { const typedData = data as unknown as Review[]; diff --git a/src/components/reviews/TestimonialsSection.tsx b/src/components/reviews/TestimonialsSection.tsx index 6513e64..6e5cefb 100644 --- a/src/components/reviews/TestimonialsSection.tsx +++ b/src/components/reviews/TestimonialsSection.tsx @@ -21,18 +21,13 @@ export function TestimonialsSection() { }, []); const fetchReviews = async () => { - console.log('TestimonialsSection fetchReviews called'); - - const { data, error } = await supabase + const { data } = await supabase .from('reviews') .select('id, rating, title, body, created_at, reviewer_name, profiles!user_id (name)') .eq('is_approved', true) .order('created_at', { ascending: false }) .limit(6); - console.log('TestimonialsSection - Raw data:', data); - console.log('TestimonialsSection - Error:', error); - if (data) { setReviews(data as unknown as Review[]); }