From 8f358279549fffb27739e9fe20f641a533aa6eea Mon Sep 17 00:00:00 2001 From: "Zaine F." <48459250+ZGeek03@users.noreply.github.com> Date: Thu, 10 Apr 2025 15:10:03 -0400 Subject: [PATCH 1/2] Added current location to selector --- components/EventMapSelect.tsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/components/EventMapSelect.tsx b/components/EventMapSelect.tsx index 797f3cd..6f2f25f 100644 --- a/components/EventMapSelect.tsx +++ b/components/EventMapSelect.tsx @@ -42,6 +42,20 @@ export default function EventMapsSelect({ Choose a Different Map + {locations.filter((v) => v.id === params.locationId?.[0]).map( + (location) => ( +
+ + You are here + + {location.name} +
+ ) + ) + } {locations .filter((v) => v.id !== params.locationId?.[0]) .map((location) => ( From fa80d67ec7739aa5aac33e4459e97e8c9d9e12a5 Mon Sep 17 00:00:00 2001 From: Ashlyn DeVries Date: Mon, 14 Apr 2025 16:48:27 -0400 Subject: [PATCH 2/2] ui updates --- components/EventMapSelect.tsx | 40 ++++++++--------------------------- 1 file changed, 9 insertions(+), 31 deletions(-) diff --git a/components/EventMapSelect.tsx b/components/EventMapSelect.tsx index 6f2f25f..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,20 +39,19 @@ export default function EventMapsSelect({ Choose a Different Map - {locations.filter((v) => v.id === params.locationId?.[0]).map( - (location) => ( + {locations + .filter((v) => v.id === params.locationId?.[0]) + .map((location) => (
- - You are here + className="border-2 border-black rounded pb-1.5 pt-0.25 text-sm text-center w-full" + > + + Current {location.name} -
- ) - ) - } + + ))} {locations .filter((v) => v.id !== params.locationId?.[0]) .map((location) => ( @@ -71,27 +67,9 @@ export default function EventMapsSelect({ {location.name} ))} - {locations.length > 1 && OR} - - - setIsOpenLocationAdder(false)} - shouldUpdateDB - /> ); }