Unverified Commit 1d86a092 authored by Abdulghane Jesry's avatar Abdulghane Jesry Committed by GitHub

Update 03-linking-and-navigating.mdx (#55969)

I've removed a duplicated example.
parent 3dc2c1c7
......@@ -64,7 +64,7 @@ export default function PostList({ posts }) {
You can use [`usePathname()`](/docs/app/api-reference/functions/use-pathname) to determine if a link is active. For example, to add a class to the active link, you can check if the current `pathname` matches the `href` of the link:
```tsx filename="app/components/links.tsx"
```tsx filename="app/components/links.tsx" switcher
'use client'
import { usePathname } from 'next/navigation'
......@@ -95,7 +95,7 @@ export function Links() {
}
```
```jsx filename="app/components/links.jsx"
```jsx filename="app/components/links.js" switcher
'use client'
import { usePathname } from 'next/navigation'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment