35 lines
936 B
TypeScript
35 lines
936 B
TypeScript
"use client";
|
|
|
|
export const dynamic = 'force-dynamic';
|
|
|
|
import React from 'react';
|
|
|
|
export default function GlobalError({
|
|
error,
|
|
reset,
|
|
}: {
|
|
error: Error & { digest?: string };
|
|
reset: () => void;
|
|
}) {
|
|
return (
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charSet="utf-8" />
|
|
<title>Erreur Système - Afrohub</title>
|
|
</head>
|
|
<body>
|
|
<div style={{ textAlign: 'center', padding: '50px', fontFamily: 'sans-serif' }}>
|
|
<h2>Erreur critique du serveur</h2>
|
|
<p style={{ color: '#666', marginBottom: '20px' }}>Une erreur inattendue s'est produite.</p>
|
|
<button
|
|
onClick={() => reset()}
|
|
style={{ padding: '10px 20px', cursor: 'pointer', backgroundColor: '#ef4444', color: 'white', border: 'none', borderRadius: '8px', fontWeight: 'bold' }}
|
|
>
|
|
Recharger l'application
|
|
</button>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|