File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -325,10 +325,11 @@ export function DocsLayout({
325325 repo,
326326 children,
327327} : DocsLayoutProps ) {
328- const { libraryId } = useParams ( {
329- from : '/$libraryId/$version/docs' ,
330- } )
331- const { _splat } = useParams ( { strict : false } )
328+
329+ const params = useParams ( { strict : false } )
330+ const libraryId = params . libraryId || ''
331+
332+ const { _splat } = params
332333 const frameworkConfig = useFrameworkConfig ( { frameworks } )
333334 const versionConfig = useVersionConfig ( { versions } )
334335 const menuConfig = useMenuConfig ( { config, frameworks, repo } )
@@ -399,8 +400,12 @@ export function DocsLayout({
399400 </ a >
400401 ) : (
401402 < Link
402- to = { child . to }
403- params
403+ to = "/$libraryId/$version/docs/$"
404+ params = { {
405+ libraryId,
406+ version : params . version || 'latest' ,
407+ _splat : child . to
408+ } }
404409 onClick = { ( ) => {
405410 detailsRef . current . removeAttribute ( 'open' )
406411 } }
You can’t perform that action at this time.
0 commit comments