From 7718a2dc66791f797dc613837c75e66437eb749e Mon Sep 17 00:00:00 2001 From: ChuYong Date: Sun, 7 Jan 2024 00:51:25 +0900 Subject: [PATCH] feat: usePathname --- app/o/[id]/page.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/o/[id]/page.tsx b/app/o/[id]/page.tsx index 0c9ea38..6008839 100644 --- a/app/o/[id]/page.tsx +++ b/app/o/[id]/page.tsx @@ -1,11 +1,10 @@ "use client" import {useEffect, useState} from "react"; import Image from "next/image"; -import {useRouter} from "next/router"; +import {usePathname} from "next/navigation"; export default function Page() { - const router = useRouter() - const { id } = router.query + const id = usePathname().split("/").pop(); const appStoreUrl = 'https://itunes.apple.com/kr/app/id393499958'; const playStoreUrl = 'https://play.google.com/store/apps/details?id=com.no5ing.bbibbi' + (id ? '&referrer='+id : ''); const appStoreInfo = (AppStore로 이동중..
직접 이동하기
);