"use client"; import React, { useState } from 'react'; import dynamic from "next/dynamic"; import Link from "next/link"; import { Section } from "@/components/section"; import { useAdminConnexion } from "@/context/adminConnexionContext"; import TeamSidePanel from "./components/teamSidePanel"; import TeamList from './components/teamViewer'; import { MapButton, ControlButton } from './components/buttons'; // Imported at runtime and not at compile time const LiveMap = dynamic(() => import('./components/liveMap'), { ssr: false }); export default function AdminPage() { const { useProtect } = useAdminConnexion(); const [selectedTeamId, setSelectedTeamId] = useState(null); useProtect(); function onSelected(id) { if (selectedTeamId === id) { setSelectedTeamId(null); } else { setSelectedTeamId(id); } } return (