More error to toast migration

This commit is contained in:
LukeGus
2025-09-09 18:49:57 -05:00
parent 7ffeb51571
commit 56a1dd0b79
6 changed files with 26 additions and 13 deletions

View File

@@ -49,6 +49,9 @@ export function HomepageAlertManager({userId, loggedIn}: AlertManagerProps): Rea
setAlerts(sortedAlerts);
setCurrentAlertIndex(0);
} catch (err) {
console.error('Failed to fetch user alerts:', err);
const {toast} = await import('sonner');
toast.error(t('homepage.failedToLoadAlerts'));
setError(t('homepage.failedToLoadAlerts'));
} finally {
setLoading(false);