mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 21:31:14 -05:00
Refactor: Implement logging phases
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user