"use client"; import { useState } from "react"; import UserManagement from "@/components/admin/UserManagement"; import EventManagement from "@/components/admin/EventManagement"; import FeedbackManagement from "@/components/admin/FeedbackManagement"; import ChallengeManagement from "@/components/admin/ChallengeManagement"; import HouseManagement from "@/components/admin/HouseManagement"; import BackgroundPreferences from "@/components/admin/BackgroundPreferences"; import EventPointsPreferences from "@/components/admin/EventPointsPreferences"; import EventFeedbackPointsPreferences from "@/components/admin/EventFeedbackPointsPreferences"; import HousePointsPreferences from "@/components/admin/HousePointsPreferences"; import { Button, Card, SectionTitle } from "@/components/ui"; interface SitePreferences { id: string; homeBackground: string | null; eventsBackground: string | null; leaderboardBackground: string | null; challengesBackground: string | null; eventRegistrationPoints: number; eventFeedbackPoints: number; houseJoinPoints: number; houseLeavePoints: number; houseCreatePoints: number; } interface AdminPanelProps { initialPreferences: SitePreferences; } type AdminSection = | "preferences" | "users" | "events" | "feedbacks" | "challenges" | "houses"; export default function AdminPanel({ initialPreferences }: AdminPanelProps) { const [activeSection, setActiveSection] = useState("preferences"); return (
ADMIN {/* Navigation Tabs */}
{activeSection === "preferences" && (

Préférences UI Globales

)} {activeSection === "users" && (

Gestion des Utilisateurs

)} {activeSection === "events" && (

Gestion des Événements

)} {activeSection === "feedbacks" && (

Gestion des Feedbacks

)} {activeSection === "challenges" && (

Gestion des Défis

)} {activeSection === "houses" && (

Gestion des Maisons

)}
); }