diff --git a/components/EventMapSelect.tsx b/components/EventMapSelect.tsx index 797f3cd..d7f0d21 100644 --- a/components/EventMapSelect.tsx +++ b/components/EventMapSelect.tsx @@ -7,12 +7,10 @@ import { DialogTrigger, } from "@/components/ui/dialog"; import { Button } from "@components/ui/button"; -import { Divider } from "@mui/material"; import { Location } from "@prisma/client"; import { Panel } from "@xyflow/react"; import { useParams, useRouter } from "next/navigation"; import { useState } from "react"; -import LocationAdder from "./LocationCreator"; import NavButtons from "./navButtons"; interface EventMapsSelectProps { @@ -27,7 +25,6 @@ export default function EventMapsSelect({ const router = useRouter(); const params = useParams(); - const [isOpenLocationAdder, setIsOpenLocationAdder] = useState(false); const [isOpen, setIsOpen] = useState(false); return ( @@ -42,6 +39,19 @@ export default function EventMapsSelect({ Choose a Different Map + {locations + .filter((v) => v.id === params.locationId?.[0]) + .map((location) => ( +
+ + Current + + {location.name} +
+ ))} {locations .filter((v) => v.id !== params.locationId?.[0]) .map((location) => ( @@ -57,27 +67,9 @@ export default function EventMapsSelect({ {location.name} ))} - {locations.length > 1 && OR} - - - setIsOpenLocationAdder(false)} - shouldUpdateDB - /> ); }