From b4d3b1a5800e263be9d2fd0c68d992a5afcd778d Mon Sep 17 00:00:00 2001 From: dwindown Date: Fri, 26 Dec 2025 00:33:29 +0700 Subject: [PATCH] Remove debug console logs from review components MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- src/components/reviews/ProductReviews.tsx | 7 +------ src/components/reviews/TestimonialsSection.tsx | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) 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[]); }