Skip to content

Commit 18faa5a

Browse files
committed
Fixed readme
1 parent 051407d commit 18faa5a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ example for creating breadcrumbs for current page.
99

1010
### Next.js (App Router)
1111

12-
```tsx{:copy}
12+
```tsx
1313
"use client";
1414

1515
import usePathname from "next/navigation";
16+
import { getRouteSegments } from 'next-router-segments';
1617

1718
export default function Page() {
1819
const {pathname} = usePathname();
@@ -30,8 +31,9 @@ Info: pathname is only available in client, so usage for client component and cl
3031

3132
### Next.js (Pages Router)
3233

33-
```tsx{:copy}
34+
```tsx
3435
import useRouter from "next/router";
36+
import { getRouteSegments } from 'next-router-segments';
3537

3638
export default function Page() {
3739
const {pathname} = useRouter();

0 commit comments

Comments
 (0)