From 73f559f049e725d2340e1c2f1f8ed0348dbf4bf7 Mon Sep 17 00:00:00 2001
From: Quaternions <krakow20@gmail.com>
Date: Thu, 3 Apr 2025 00:49:32 -0700
Subject: [PATCH] web: useParams

---
 web/src/app/maps/[mapId]/page.tsx | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/web/src/app/maps/[mapId]/page.tsx b/web/src/app/maps/[mapId]/page.tsx
index 36cbdbd..f2152ea 100644
--- a/web/src/app/maps/[mapId]/page.tsx
+++ b/web/src/app/maps/[mapId]/page.tsx
@@ -1,17 +1,12 @@
 import Webpage from "@/app/_components/webpage";
+import { useParams } from "next/navigation";
 
-interface MapParams {
-    params: {
-        mapId: string;
-    };
-}
-
-export default function Map({ params }: MapParams) {
-    const { mapId } = params;
+export default function Map() {
+    const { mapId } = useParams<{mapId: string}>()
 
     return (
         <Webpage>
             <p>map { mapId }</p>
         </Webpage>
     );
-}
\ No newline at end of file
+}