import React, { useState } from "react"; import { motion } from "framer-motion"; import { Swiper, SwiperSlide } from "swiper/react"; import "swiper/css"; import "swiper/css/navigation"; import { Navigation } from "swiper/modules"; const AdminDashboard = () => { const [activeTab, setActiveTab] = useState("hero"); const [images, setImages] = useState([ "https://vibra.qodeinteractive.com/wp-content/uploads/2019/02/h1-slider-3-background.jpg", "https://vibra.qodeinteractive.com/wp-content/uploads/2019/02/h1-slider-2-background.jpg", "https://vibra.qodeinteractive.com/wp-content/uploads/2019/02/h1-slider-1-background.jpg", ]); 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)); }; return (
{/* Header */}

Admin Dashboard

{/* Tab Navigation */}
{[ { label: "Hero", value: "hero" }, { label: "Coach", value: "coach" }, { label: "Events", value: "calendar" }, ].map((tab) => ( ))}
{/* Tab Content */} {activeTab === "hero" && (
{images.map((image, index) => ( {`Slide ))}

Manage hero section images.

)} {activeTab === "coach" && (

Manage Coaches

setNewCoach({ ...newCoach, name: e.target.value }) } className="px-4 py-3 border rounded-lg bg-gray-800 text-white focus:ring focus:ring-gray-500" /> setNewCoach({ ...newCoach, title: e.target.value }) } className="px-4 py-3 border rounded-lg bg-gray-800 text-white focus:ring focus:ring-gray-500" />
    {coaches.map((coach, index) => (
  • {coach.name}

    {coach.title}

  • ))}

Manage the coaching team.

)} {activeTab === "calendar" && (

Events Calendar

Schedule, edit, or remove events from the calendar.

)}
); }; export default AdminDashboard;