web: useParams

This commit is contained in:
Quaternions 2025-04-03 00:49:32 -07:00 committed by Quaternions
parent 3f377f4605
commit 73f559f049

@ -1,17 +1,12 @@
import Webpage from "@/app/_components/webpage"; import Webpage from "@/app/_components/webpage";
import { useParams } from "next/navigation";
interface MapParams { export default function Map() {
params: { const { mapId } = useParams<{mapId: string}>()
mapId: string;
};
}
export default function Map({ params }: MapParams) {
const { mapId } = params;
return ( return (
<Webpage> <Webpage>
<p>map { mapId }</p> <p>map { mapId }</p>
</Webpage> </Webpage>
); );
} }