mirror of
https://github.com/arthur-pbty/clock.git
synced 2026-06-09 01:01:06 +02:00
feat: add ClockApp and SettingsPanel components with customizable settings
- Implemented ClockApp component to display time based on user settings. - Created SettingsPanel for users to adjust clock type, time format, timezone, and theme. - Added hooks for managing time, settings persistence, and fullscreen functionality. - Introduced types for clock settings and themes, including default settings. - Integrated URL parameter parsing for sharing clock configurations. - Enhanced user experience with loading states and visual transitions.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
'use client';
|
||||
|
||||
import { useEffect } from 'react';
|
||||
|
||||
export default function Error({
|
||||
error,
|
||||
reset,
|
||||
}: {
|
||||
error: Error & { digest?: string };
|
||||
reset: () => void;
|
||||
}) {
|
||||
useEffect(() => {
|
||||
console.error(error);
|
||||
}, [error]);
|
||||
|
||||
return (
|
||||
<div className="min-h-screen flex flex-col items-center justify-center bg-slate-900 text-white p-4">
|
||||
<h1 className="text-4xl font-bold text-red-500 mb-4">Oups !</h1>
|
||||
<h2 className="text-xl font-semibold mb-4">Une erreur s'est produite</h2>
|
||||
<p className="text-slate-400 mb-8 text-center max-w-md">
|
||||
Nous sommes désolés, quelque chose s'est mal passé. Veuillez réessayer.
|
||||
</p>
|
||||
<button
|
||||
onClick={reset}
|
||||
className="px-6 py-3 bg-blue-500 text-white rounded-lg font-medium hover:bg-blue-600 transition-colors"
|
||||
>
|
||||
Réessayer
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user