mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 23:51:13 -05:00
Fix: Resolve logger not found errors
This commit is contained in:
@@ -90,7 +90,7 @@ export default function OperatorDetail() {
|
|||||||
fetchPhotoCount(data.id);
|
fetchPhotoCount(data.id);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error('Error fetching operator', { error });
|
handleNonCriticalError(error, { action: 'Fetch Operator', metadata: { slug } });
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
@@ -111,7 +111,7 @@ export default function OperatorDetail() {
|
|||||||
if (error) throw error;
|
if (error) throw error;
|
||||||
setParks(data || []);
|
setParks(data || []);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error('Error fetching parks', { error });
|
handleNonCriticalError(error, { action: 'Fetch Operator Parks', metadata: { operatorId } });
|
||||||
} finally {
|
} finally {
|
||||||
setParksLoading(false);
|
setParksLoading(false);
|
||||||
}
|
}
|
||||||
@@ -138,7 +138,7 @@ export default function OperatorDetail() {
|
|||||||
if (ridesError) throw ridesError;
|
if (ridesError) throw ridesError;
|
||||||
setOperatingRides(ridesData?.length || 0);
|
setOperatingRides(ridesData?.length || 0);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error('Error fetching statistics', { error });
|
handleNonCriticalError(error, { action: 'Fetch Operator Statistics', metadata: { operatorId } });
|
||||||
} finally {
|
} finally {
|
||||||
setStatsLoading(false);
|
setStatsLoading(false);
|
||||||
}
|
}
|
||||||
@@ -155,7 +155,7 @@ export default function OperatorDetail() {
|
|||||||
if (error) throw error;
|
if (error) throw error;
|
||||||
setTotalPhotos(count || 0);
|
setTotalPhotos(count || 0);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error('Error fetching photo count', { error });
|
handleNonCriticalError(error, { action: 'Fetch Operator Photo Count', metadata: { operatorId } });
|
||||||
setTotalPhotos(0);
|
setTotalPhotos(0);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ export default function OperatorParks() {
|
|||||||
setParks(parksData || []);
|
setParks(parksData || []);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error('Error fetching data', { error });
|
handleNonCriticalError(error, { action: 'Fetch Operator Parks Data', metadata: { operatorSlug } });
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ export default function OwnerParks() {
|
|||||||
setParks(parksData || []);
|
setParks(parksData || []);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error('Error fetching data', { error });
|
handleNonCriticalError(error, { action: 'Fetch Owner Parks Data', metadata: { ownerSlug } });
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ export default function ParkRides() {
|
|||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
setRides((ridesData || []) as any);
|
setRides((ridesData || []) as any);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error('Error fetching park and rides', { error });
|
handleNonCriticalError(error, { action: 'Fetch Park Rides', metadata: { parkSlug } });
|
||||||
toast({
|
toast({
|
||||||
title: "Error",
|
title: "Error",
|
||||||
description: "Failed to load park rides.",
|
description: "Failed to load park rides.",
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ export default function Profile() {
|
|||||||
parkCount: parkCount
|
parkCount: parkCount
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error('Error fetching calculated stats', { error });
|
handleNonCriticalError(error, { action: 'Fetch Calculated Stats', metadata: { userId } });
|
||||||
toast({
|
toast({
|
||||||
variant: 'destructive',
|
variant: 'destructive',
|
||||||
description: getErrorMessage(error),
|
description: getErrorMessage(error),
|
||||||
@@ -391,7 +391,7 @@ export default function Profile() {
|
|||||||
|
|
||||||
setRecentActivity(combined);
|
setRecentActivity(combined);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error('Error fetching recent activity', { error });
|
handleNonCriticalError(error, { action: 'Fetch Recent Activity', metadata: { userId } });
|
||||||
toast({
|
toast({
|
||||||
variant: 'destructive',
|
variant: 'destructive',
|
||||||
description: getErrorMessage(error),
|
description: getErrorMessage(error),
|
||||||
@@ -452,7 +452,7 @@ export default function Profile() {
|
|||||||
await fetchRecentActivity(data.user_id || '');
|
await fetchRecentActivity(data.user_id || '');
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error('Error fetching profile', { error });
|
handleNonCriticalError(error, { action: 'Fetch Profile', metadata: { username } });
|
||||||
toast({
|
toast({
|
||||||
variant: "destructive",
|
variant: "destructive",
|
||||||
title: "Error loading profile",
|
title: "Error loading profile",
|
||||||
@@ -493,7 +493,7 @@ export default function Profile() {
|
|||||||
await fetchRecentActivity(user.id);
|
await fetchRecentActivity(user.id);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error('Error fetching profile', { error });
|
handleNonCriticalError(error, { action: 'Fetch Current User Profile' });
|
||||||
toast({
|
toast({
|
||||||
variant: "destructive",
|
variant: "destructive",
|
||||||
title: "Error loading profile",
|
title: "Error loading profile",
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ export default function PropertyOwnerDetail() {
|
|||||||
fetchPhotoCount(data.id);
|
fetchPhotoCount(data.id);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error('Error fetching property owner', { error });
|
handleNonCriticalError(error, { action: 'Fetch Property Owner', metadata: { slug } });
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
@@ -111,7 +111,7 @@ export default function PropertyOwnerDetail() {
|
|||||||
if (error) throw error;
|
if (error) throw error;
|
||||||
setParks(data || []);
|
setParks(data || []);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error('Error fetching parks', { error });
|
handleNonCriticalError(error, { action: 'Fetch Owner Parks', metadata: { ownerId } });
|
||||||
} finally {
|
} finally {
|
||||||
setParksLoading(false);
|
setParksLoading(false);
|
||||||
}
|
}
|
||||||
@@ -138,7 +138,7 @@ export default function PropertyOwnerDetail() {
|
|||||||
if (ridesError) throw ridesError;
|
if (ridesError) throw ridesError;
|
||||||
setOperatingRides(ridesData?.length || 0);
|
setOperatingRides(ridesData?.length || 0);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error('Error fetching statistics', { error });
|
handleNonCriticalError(error, { action: 'Fetch Owner Statistics', metadata: { ownerId } });
|
||||||
} finally {
|
} finally {
|
||||||
setStatsLoading(false);
|
setStatsLoading(false);
|
||||||
}
|
}
|
||||||
@@ -155,7 +155,7 @@ export default function PropertyOwnerDetail() {
|
|||||||
if (error) throw error;
|
if (error) throw error;
|
||||||
setTotalPhotos(count || 0);
|
setTotalPhotos(count || 0);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error('Error fetching photo count', { error });
|
handleNonCriticalError(error, { action: 'Fetch Owner Photo Count', metadata: { ownerId } });
|
||||||
setTotalPhotos(0);
|
setTotalPhotos(0);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ export default function RideModelDetail() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error('Error fetching data', { error });
|
handleNonCriticalError(error, { action: 'Fetch Ride Model Data', metadata: { manufacturerSlug, modelSlug } });
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ export default function RideModelRides() {
|
|||||||
setModel(modelData as RideModel);
|
setModel(modelData as RideModel);
|
||||||
setRides(ridesData as Ride[] || []);
|
setRides(ridesData as Ride[] || []);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error("Error fetching data", { error });
|
handleNonCriticalError(error, { action: 'Fetch Model Rides Data', metadata: { manufacturerSlug, modelSlug } });
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user