Simplification complète de l'app - Suppression admin/WiFi/bungalow
- Suppression de toute la partie admin (routes, composants, API) - Suppression du WiFi et du numéro de bungalow - Simplification de l'accueil (logo, météo, message statique) - App 100% statique maintenant - Redirection simple vers /accueil - Nettoyage des hooks et types inutilisés
This commit is contained in:
@ -1,53 +1,37 @@
|
||||
"use client";
|
||||
|
||||
import { Suspense } from "react";
|
||||
import dynamic from "next/dynamic";
|
||||
import Layout from "@/components/layout/Layout";
|
||||
import WifiCard from "@/components/accueil/WifiCard";
|
||||
import Logo from "@/components/Logo";
|
||||
import { useClientData } from "@/lib/hooks/useClientData";
|
||||
import { config } from "@/lib/config";
|
||||
|
||||
const WeatherWidget = dynamic(() => import("@/components/accueil/WeatherWidget"), {
|
||||
loading: () => <div className="h-32 bg-gray-100 rounded-2xl animate-pulse" />,
|
||||
loading: () => <div className="h-32 bg-gray-100 dark:bg-gray-800 rounded-2xl animate-pulse" />,
|
||||
ssr: false,
|
||||
});
|
||||
|
||||
function AccueilContent() {
|
||||
const { bungalowNumber, gerantMessage, loading } = useClientData();
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
<Layout>
|
||||
<div className="px-4 py-6 space-y-6">
|
||||
<div className="h-32 bg-gray-100 rounded-2xl animate-pulse" />
|
||||
</div>
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
|
||||
export default function AccueilPage() {
|
||||
return (
|
||||
<Layout>
|
||||
<div className="px-4 py-6 space-y-6">
|
||||
<header className="text-center py-4">
|
||||
<Logo size={140} className="mb-4" />
|
||||
<h1 className="text-2xl font-bold text-primary mb-2">
|
||||
<h1 className="text-2xl font-bold text-primary dark:text-primary mb-2">
|
||||
Ia Ora Na
|
||||
</h1>
|
||||
<p className="text-lg text-gray-700">
|
||||
Bienvenue au Bungalow {bungalowNumber}
|
||||
<p className="text-lg text-gray-700 dark:text-gray-300">
|
||||
Bienvenue à la Pension Marama
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<WifiCard />
|
||||
|
||||
<WeatherWidget />
|
||||
|
||||
<section className="bg-secondary rounded-2xl p-6">
|
||||
<h2 className="text-xl font-semibold text-primary mb-3">
|
||||
<section className="bg-secondary dark:bg-primary/20 rounded-2xl p-6">
|
||||
<h2 className="text-xl font-semibold text-primary dark:text-primary mb-3">
|
||||
Le mot du gérant
|
||||
</h2>
|
||||
<p className="text-gray-700 leading-relaxed">
|
||||
{gerantMessage}
|
||||
<p className="text-gray-700 dark:text-gray-300 leading-relaxed">
|
||||
{config.gerantMessage}
|
||||
</p>
|
||||
</section>
|
||||
</div>
|
||||
@ -55,17 +39,3 @@ function AccueilContent() {
|
||||
);
|
||||
}
|
||||
|
||||
export default function AccueilPage() {
|
||||
return (
|
||||
<Suspense fallback={
|
||||
<Layout>
|
||||
<div className="px-4 py-6 space-y-6">
|
||||
<div className="h-32 bg-gray-100 rounded-2xl animate-pulse" />
|
||||
</div>
|
||||
</Layout>
|
||||
}>
|
||||
<AccueilContent />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user