Skip to content

Commit 6c076f1

Browse files
improve docs
1 parent 4086a46 commit 6c076f1

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

docs/content/drafts/UnderlineNav2.mdx

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -103,22 +103,15 @@ render(<Navigation />)
103103
### With React Router
104104

105105
```jsx
106-
import {Link, useNavigate} from 'react-router-dom'
106+
import {Link} from 'react-router-dom'
107107
import {UnderlineNav} from '@primer/react/drafts'
108108
const Navigation = () => {
109-
const navigate = useNavigate()
110109
return (
111110
<UnderlineNav aria-label="Repository">
112111
<UnderlineNav.Item as={Link} to="code" counter={4} selected>
113112
Code
114113
</UnderlineNav.Item>
115-
<UnderlineNav.Item
116-
counter={44}
117-
as={Link}
118-
onSelect={() => {
119-
navigate('issues')
120-
}}
121-
>
114+
<UnderlineNav.Item counter={44} as={Link} to="issues">
122115
Issues
123116
</UnderlineNav.Item>
124117
<UnderlineNav.Item as={Link} to="pulls">
@@ -129,11 +122,6 @@ const Navigation = () => {
129122
}
130123
```
131124

132-
<Note>
133-
You can bind the routing with both 'to' and 'onSelect' prop here. However; please note that if an 'href' prop is
134-
passed, it will be ignored here.
135-
</Note>
136-
137125
## Props
138126

139127
### UnderlineNav

0 commit comments

Comments
 (0)