Refactor: Implement logging phases

This commit is contained in:
gpt-engineer-app[bot]
2025-11-03 17:08:36 +00:00
parent 12de4e2ec1
commit b6179372e6
27 changed files with 72 additions and 45 deletions

View File

@@ -12,6 +12,7 @@ import { ArrowLeft, MapPin, Star, Globe, Calendar, Edit, Ruler } from 'lucide-re
import { Company } from '@/types/database';
import { supabase } from '@/integrations/supabase/client';
import { DesignerPhotoGallery } from '@/components/companies/DesignerPhotoGallery';
import { logger } from '@/lib/logger';
// Lazy load admin form
const DesignerForm = lazy(() => import('@/components/admin/DesignerForm').then(m => ({ default: m.DesignerForm })));
@@ -81,7 +82,7 @@ export default function DesignerDetail() {
fetchStatistics(data.id);
}
} catch (error) {
console.error('Error fetching designer:', error);
logger.error('Error fetching designer', { error });
} finally {
setLoading(false);
}
@@ -108,7 +109,7 @@ export default function DesignerDetail() {
if (photosError) throw photosError;
setTotalPhotos(photosCount || 0);
} catch (error) {
console.error('Error fetching statistics:', error);
logger.error('Error fetching statistics', { error });
} finally {
setStatsLoading(false);
}