import { useState } from "react"; import dynamic from "next/dynamic"; import { ZoneTypes } from "@/util/types"; // Imported at runtime and not at compile time const CircleZoneSelector = dynamic(() => import('./circleZoneSelector'), { ssr: false }); const PolygonZoneSelector = dynamic(() => import('./polygonZoneSelector'), { ssr: false }); function ZoneTypeButton({title, onClick, isSelected}) { const grayStyle = "bg-gray-300 hover:bg-gray-400"; const blueStyle = "bg-custom-light-blue"; return (

{title}

); } export default function PlayingZoneSelector({ display }) { const [zoneType, setZoneType] = useState(ZoneTypes.POLYGON); return (

Type de zone :

setZoneType(ZoneTypes.CIRCLE)} isSelected={zoneType == ZoneTypes.CIRCLE} /> setZoneType(ZoneTypes.POLYGON)} isSelected={zoneType == ZoneTypes.POLYGON} />
); }