Add Event Management section to admin page, allowing users to manage events alongside preferences and user management. Updated UI to include event button and corresponding display area.

This commit is contained in:
Julien Froidefond
2025-12-09 08:49:47 +01:00
parent 4de3fea776
commit 82c557e10c
4 changed files with 600 additions and 1 deletions

View File

@@ -6,6 +6,7 @@ import { useRouter } from "next/navigation";
import Navigation from "@/components/Navigation";
import ImageSelector from "@/components/ImageSelector";
import UserManagement from "@/components/UserManagement";
import EventManagement from "@/components/EventManagement";
interface SitePreferences {
id: string;
@@ -14,7 +15,7 @@ interface SitePreferences {
leaderboardBackground: string | null;
}
type AdminSection = "preferences" | "users";
type AdminSection = "preferences" | "users" | "events";
export default function AdminPage() {
const { data: session, status } = useSession();
@@ -143,6 +144,16 @@ export default function AdminPage() {
>
Utilisateurs
</button>
<button
onClick={() => setActiveSection("events")}
className={`px-6 py-3 border uppercase text-xs tracking-widest rounded transition ${
activeSection === "events"
? "border-pixel-gold bg-pixel-gold/10 text-pixel-gold"
: "border-pixel-gold/30 bg-black/60 text-gray-400 hover:border-pixel-gold/50"
}`}
>
Événements
</button>
</div>
{activeSection === "preferences" && (
@@ -245,6 +256,15 @@ export default function AdminPage() {
<UserManagement />
</div>
)}
{activeSection === "events" && (
<div className="bg-black/80 border border-pixel-gold/30 rounded-lg p-6 backdrop-blur-sm">
<h2 className="text-2xl font-gaming font-bold mb-6 text-pixel-gold">
Gestion des Événements
</h2>
<EventManagement />
</div>
)}
</div>
</section>
</main>