Skip to content

Commit

Permalink
feat: usePathname
Browse files Browse the repository at this point in the history
  • Loading branch information
CChuYong committed Jan 6, 2024
1 parent bd9571a commit 7718a2d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/o/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -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 = (<span>AppStore로 이동중..<br/><a href={appStoreUrl}>직접 이동하기</a></span>);
Expand Down

0 comments on commit 7718a2d

Please sign in to comment.