web: useParams
This commit is contained in:
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>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user