File tree Expand file tree Collapse file tree 1 file changed +8
-16
lines changed
Expand file tree Collapse file tree 1 file changed +8
-16
lines changed Original file line number Diff line number Diff line change @@ -186,13 +186,13 @@ const useMenuConfig = ({
186186 children : [
187187 {
188188 label : 'Home' ,
189- to : '/$libraryId/$version ' ,
189+ to : '.. ' ,
190190 } ,
191191 ...( frameworks . length > 1
192192 ? [
193193 {
194194 label : 'Frameworks' ,
195- to : '/$libraryId/$version/docs /framework' ,
195+ to : '. /framework' ,
196196 } ,
197197 ]
198198 : [ ] ) ,
@@ -325,10 +325,10 @@ export function DocsLayout({
325325 repo,
326326 children,
327327} : DocsLayoutProps ) {
328- const params = useParams ( { strict : false } )
329- const libraryId = params . libraryId || ''
330-
331- const { _splat } = params
328+ const { libraryId } = useParams ( {
329+ from : '/$ libraryId/$version/docs' ,
330+ } )
331+ const { _splat } = useParams ( { strict : false } )
332332 const frameworkConfig = useFrameworkConfig ( { frameworks } )
333333 const versionConfig = useVersionConfig ( { versions } )
334334 const menuConfig = useMenuConfig ( { config, frameworks, repo } )
@@ -399,16 +399,8 @@ export function DocsLayout({
399399 </ a >
400400 ) : (
401401 < Link
402- to = {
403- child . to . startsWith ( '/' )
404- ? child . to
405- : '/$libraryId/$version/docs/$'
406- }
407- params = { {
408- libraryId,
409- version : params . version || 'latest' ,
410- _splat : child . to ,
411- } }
402+ to = { child . to }
403+ params
412404 onClick = { ( ) => {
413405 detailsRef . current . removeAttribute ( 'open' )
414406 } }
You can’t perform that action at this time.
0 commit comments