import React, { useState } from "react"; import { motion } from "framer-motion"; import Hero from "../components/Hero"; import Coach from "../components/Coach"; import Events from "../components/Events"; const AdminDashboard = () => { const [activeTab, setActiveTab] = useState("hero"); // Coach state const [coaches, setCoaches] = useState([ { name: "John Doe", title: "Head Coach" }, { name: "Jane Smith", title: "Assistant Coach" }, ]); const [newCoach, setNewCoach] = useState({ name: "", title: "" }); const addCoach = () => { if (newCoach.name && newCoach.title) { setCoaches([...coaches, newCoach]); setNewCoach({ name: "", title: "" }); } }; const removeCoach = (index) => { setCoaches(coaches.filter((_, i) => i !== index)); }; // Event state const [events, setEvents] = useState([ { title: "Team Meeting", date: "2025-02-01", description: "Monthly meeting.", }, { title: "Workshop", date: "2025-02-05", description: "Training workshop.", }, ]); const [newEvent, setNewEvent] = useState({ title: "", date: "", description: "", }); const addEvent = () => { if (newEvent.title && newEvent.date && newEvent.description) { setEvents([...events, newEvent]); setNewEvent({ title: "", date: "", description: "" }); } }; return (

Admin Dashboard

{/* Tab Navigation */}
{[ { label: "Hero", value: "hero" }, { label: "Coach", value: "coach" }, { label: "Events", value: "calendar" }, ].map((tab) => ( ))}
{/* Tab Content */} {/* Hero Content */} {activeTab === "hero" && } {/* Coach Content */} {activeTab === "coach" && ( )} {/* Events Content */} {activeTab === "calendar" && ( )}
); }; export default AdminDashboard;