File tree 2 files changed +4
-9
lines changed
2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -88,9 +88,7 @@ function Doc({
88
88
children
89
89
} ) {
90
90
const [ navigationActive , setNavigationActive ] = useState ( false )
91
- const [ version , setVersion ] = useState (
92
- router . asPath . split ( / ( v [ 0 - 9 ] ) / ) [ 1 ] || 'v2'
93
- )
91
+ const [ version ] = useState ( router . asPath . split ( / ( v [ 0 - 9 ] ) / ) [ 1 ] || 'v2' )
94
92
const versionData = version === 'v2' ? dataV2 : dataV1
95
93
const dataContext = useContext ( DataContext )
96
94
@@ -148,8 +146,7 @@ function Doc({
148
146
{ version === 'v1' && (
149
147
< Note >
150
148
This documentation is for < b > version 1</ b > of the{ ' ' }
151
- { PRODUCT_NAME }
152
- platform. For the latest features, please see{ ' ' }
149
+ { PRODUCT_NAME } platform. For the latest features, please see{ ' ' }
153
150
< Link href = "/docs/v2" > the version 2 documentation</ Link > . If
154
151
you have yet to upgrade, see the{ ' ' }
155
152
< Link href = "/guides/migrate-to-zeit-now/" > upgrade guide</ Link >
Original file line number Diff line number Diff line change 1
- import { useState , useEffect , useRef } from 'react'
1
+ import { useState , useEffect } from 'react'
2
2
import { MDXProvider } from '@mdx-js/tag'
3
3
import { withRouter } from 'next/router'
4
4
import { useAmp } from 'next/amp'
@@ -45,9 +45,7 @@ function ReferencePage({
45
45
const [ activeEntry , setActiveEntry ] = useState ( null )
46
46
const [ activeSubEntry , setActiveSubEntry ] = useState ( null )
47
47
const [ navigationActive , setNavigationActive ] = useState ( false )
48
- const [ version , setVersion ] = useState (
49
- router . asPath . split ( / ( v [ 0 - 9 ] ) / ) [ 1 ] || 'v2'
50
- )
48
+ const [ version ] = useState ( router . asPath . split ( / ( v [ 0 - 9 ] ) / ) [ 1 ] || 'v2' )
51
49
const [ sidebarNode , setSidebarNode ] = useState ( null )
52
50
53
51
const updateActive = ( {
You can’t perform that action at this time.
0 commit comments