@@ -180,13 +180,6 @@ export default function Project({ error, project, tab }) {
180180 return < ErrorPage statusCode = { error . status } />
181181 }
182182
183- const onChangeTab = tab => {
184- router . push ( {
185- pathname : '/[project]' ,
186- query : { project : name , tab }
187- } , tab === 'readme' ? `/${ encodeURIComponent ( name ) } ` : null , { scroll : false } )
188- }
189-
190183 return (
191184 < DefaultLayout title = { `${ name } | Quickdocs` } description = { description } >
192185 < SimpleGrid columns = { [ 1 , 1 , 1 , 10 ] } rowGap = { 5 } columnGap = { 10 } templateRows = "min-content minmax(0, auto)" >
@@ -200,9 +193,9 @@ export default function Project({ error, project, tab }) {
200193 < ProjectMetadataSection upstreamUrl = { upstream_url } authors = { authors } maintainers = { maintainers } licenses = { licenses } />
201194 </ GridItem >
202195 < GridItem colSpan = { [ 1 , 1 , 1 , 7 ] } >
203- < TabSwitch tab = { tab } onChange = { onChangeTab } >
204- < Tab name = "readme" > README</ Tab >
205- < Tab name = "systems" > Provided Systems</ Tab >
196+ < TabSwitch tab = { tab } >
197+ < Tab name = "readme" href = { `/ ${ encodeURIComponent ( name ) } ` } > README</ Tab >
198+ < Tab name = "systems" href = { `/ ${ encodeURIComponent ( name ) } ?tab=systems` } > Provided Systems</ Tab >
206199 </ TabSwitch >
207200 < Box py = "15px" >
208201 { tab === 'readme'
@@ -218,7 +211,7 @@ export default function Project({ error, project, tab }) {
218211 < Wrap >
219212 { depends_on . map ( name => (
220213 < WrapItem key = { `dependencies_${ name } ` } >
221- < NextLink href = { `/${ encodeURIComponent ( name ) } ` } >
214+ < NextLink href = { `/${ encodeURIComponent ( name ) } ` } passHref >
222215 < Link fontWeight = "bold" color = "gray.700" > { name } </ Link >
223216 </ NextLink >
224217 </ WrapItem >
0 commit comments