File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -59,8 +59,9 @@ export const PlaygroundContextProvider = (props: { children: React.ReactNode })
59
59
const router = useRouter ( )
60
60
const [ activeSectionIndex , setActiveSectionIndex ] = useState ( 0 )
61
61
const [ scrollToSection , setScrollToSection ] = useState < number > ( )
62
- const path = router . asPath . split ( '?' ) [ 0 ] . split ( '#' ) [ 0 ]
63
-
62
+ const path = router . asPath . includes ( '@latest' )
63
+ ? router . asPath . split ( '?' ) [ 0 ] . split ( '#' ) [ 0 ] . split ( '@latest' ) [ 1 ]
64
+ : router . asPath . split ( '?' ) [ 0 ] . split ( '#' ) [ 0 ]
64
65
const relevantArticles = articles . filter ( ( { slug } ) => slug === path )
65
66
66
67
const { langId } = router . query
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ export const CodeLanguagePicker = () => {
15
15
< SubNav . Link
16
16
key = { language . id }
17
17
as = { Link }
18
- href = { `${ routePath } ?langId=${ language . id } ` }
18
+ href = { `/ ${ router . locale } ${ routePath } ?langId=${ language . id } ` }
19
19
selected = { language . id === currentLanguage . id }
20
20
>
21
21
{ language . label }
You can’t perform that action at this time.
0 commit comments