mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 12:31:13 -05:00
Remove debug console logs
This commit is contained in:
@@ -50,8 +50,6 @@ export function EntityPhotoGallery({
|
||||
|
||||
const fetchPhotos = async () => {
|
||||
try {
|
||||
console.log('📷 [FETCH PHOTOS] Starting fetch for:', { entityId, entityType });
|
||||
|
||||
// Fetch photos directly from the photos table
|
||||
const { data: photoData, error } = await supabase
|
||||
.from('photos')
|
||||
@@ -60,8 +58,6 @@ export function EntityPhotoGallery({
|
||||
.eq('entity_id', entityId)
|
||||
.order('created_at', { ascending: sortBy === 'oldest' });
|
||||
|
||||
console.log('📷 [FETCH PHOTOS] Query result:', { photoData, error, count: photoData?.length });
|
||||
|
||||
if (error) throw error;
|
||||
|
||||
// Map to Photo interface
|
||||
@@ -74,7 +70,6 @@ export function EntityPhotoGallery({
|
||||
created_at: photo.created_at,
|
||||
})) || [];
|
||||
|
||||
console.log('📷 [FETCH PHOTOS] Mapped photos:', mappedPhotos);
|
||||
setPhotos(mappedPhotos);
|
||||
} catch (error: unknown) {
|
||||
console.error('📷 [FETCH PHOTOS] Error:', error);
|
||||
|
||||
@@ -17,6 +17,7 @@ import { getErrorMessage } from '@/lib/errorHandler';
|
||||
import { supabase } from '@/integrations/supabase/client';
|
||||
import { invokeWithTracking } from '@/lib/edgeFunctionTracking';
|
||||
import { useAuth } from '@/hooks/useAuth';
|
||||
import { logger } from '@/lib/logger';
|
||||
|
||||
interface PhotoUploadProps {
|
||||
onUploadComplete?: (urls: string[], imageId?: string) => void;
|
||||
@@ -250,7 +251,7 @@ export function PhotoUpload({
|
||||
'DELETE'
|
||||
);
|
||||
} catch (deleteError) {
|
||||
console.warn('Failed to delete old avatar:', deleteError);
|
||||
logger.warn('Failed to delete old avatar');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -232,14 +232,6 @@ export function UppyPhotoSubmissionUpload({
|
||||
throw itemsError;
|
||||
}
|
||||
|
||||
console.log('✅ Photo submission created:', {
|
||||
submission_id: submissionData.id,
|
||||
photo_submission_id: photoSubmissionData.id,
|
||||
entity_type: entityType,
|
||||
entity_id: entityId,
|
||||
photo_count: photoItems.length,
|
||||
});
|
||||
|
||||
toast({
|
||||
title: 'Submission Successful',
|
||||
description: 'Your photos have been submitted for review. Thank you for contributing!',
|
||||
|
||||
Reference in New Issue
Block a user