File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff 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'
107107import {UnderlineNav } from ' @primer/react/drafts'
108108const 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
You can’t perform that action at this time.
0 commit comments