Remove debug console logs from review components

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
dwindown
2025-12-26 00:33:29 +07:00
parent 50a642b07b
commit b4d3b1a580
2 changed files with 2 additions and 12 deletions

View File

@@ -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[];

View File

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