gestion des messages page 404
This commit is contained in:
@@ -1,8 +1,17 @@
|
||||
import React from 'react';
|
||||
import Link from 'next/link';
|
||||
import { Home, ArrowLeft, Search } from 'lucide-react';
|
||||
import { Home, Search } from 'lucide-react';
|
||||
import { getSiteSettings } from '../lib/settings';
|
||||
|
||||
export default async function NotFound() {
|
||||
const settings = await getSiteSettings();
|
||||
const quotes = (settings as any)?.notFoundQuotes && (settings as any).notFoundQuotes.length > 0
|
||||
? (settings as any).notFoundQuotes
|
||||
: ["L'échec est une étape vers la réussite, mais une erreur 404 est juste une impasse."];
|
||||
|
||||
// Sélection d'une phrase aléatoire
|
||||
const randomQuote = quotes[Math.floor(Math.random() * quotes.length)];
|
||||
|
||||
export default function NotFound() {
|
||||
return (
|
||||
<div className="min-h-screen bg-white flex items-center justify-center px-4 sm:px-6 lg:px-8 py-24">
|
||||
<div className="max-w-md w-full text-center">
|
||||
@@ -41,10 +50,11 @@ export default function NotFound() {
|
||||
|
||||
<div className="mt-12 pt-12 border-t border-gray-100">
|
||||
<p className="text-sm text-gray-400 italic">
|
||||
"L'échec est une étape vers la réussite, mais une erreur 404 est juste une impasse."
|
||||
"{randomQuote}"
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user