feat: Implement a new dashboard shell with animated background, refactor dashboard data fetching into a dedicated API route, and introduce new UI components.**

This commit is contained in:
2025-12-10 03:16:36 -05:00
parent ca6484aea5
commit 39fdf16280
24 changed files with 767 additions and 412 deletions
@@ -398,9 +398,17 @@ export function AnimationPreferencesProvider({
export function useAnimationPreferences(): AnimationPreferencesContextValue {
const ctx = useContext(AnimationPreferencesContext);
if (!ctx) {
throw new Error(
"useAnimationPreferences must be used within an AnimationPreferencesProvider",
);
// Fallback instead of throwing to prevent runtime crashes if provider is missing
console.warn("useAnimationPreferences used without provider");
return {
prefersReducedMotion: false,
animationSpeedMultiplier: 1,
updatePreferences: () => { },
setPrefersReducedMotion: () => { },
setAnimationSpeedMultiplier: () => { },
isUpdating: false,
lastSyncedAt: null,
};
}
return ctx;
}