Skip to content

Commit 013e111

Browse files
Minor spacing fix (#1811)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 14b048a commit 013e111

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

components/layout/docs.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,7 @@ function Doc({
8888
children
8989
}) {
9090
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')
9492
const versionData = version === 'v2' ? dataV2 : dataV1
9593
const dataContext = useContext(DataContext)
9694

@@ -148,8 +146,7 @@ function Doc({
148146
{version === 'v1' && (
149147
<Note>
150148
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{' '}
153150
<Link href="/docs/v2">the version 2 documentation</Link>. If
154151
you have yet to upgrade, see the{' '}
155152
<Link href="/guides/migrate-to-zeit-now/">upgrade guide</Link>

components/layout/reference.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useState, useEffect, useRef } from 'react'
1+
import { useState, useEffect } from 'react'
22
import { MDXProvider } from '@mdx-js/tag'
33
import { withRouter } from 'next/router'
44
import { useAmp } from 'next/amp'
@@ -45,9 +45,7 @@ function ReferencePage({
4545
const [activeEntry, setActiveEntry] = useState(null)
4646
const [activeSubEntry, setActiveSubEntry] = useState(null)
4747
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')
5149
const [sidebarNode, setSidebarNode] = useState(null)
5250

5351
const updateActive = ({

0 commit comments

Comments
 (0)