update start script, remove extra tabs code

This commit is contained in:
Jeff Escalante 2021-01-07 14:05:00 -05:00 committed by Luke Kysow
parent ddbd372649
commit 5577783da3
2 changed files with 2 additions and 28 deletions

View File

@ -1,5 +1,4 @@
import TabsBase from '@hashicorp/react-tabs'
import s from '@hashicorp/nextjs-scripts/lib/providers/docs/style.module.css'
import { Tabs, Tab } from '@hashicorp/nextjs-scripts/lib/providers/docs'
import EnterpriseAlertBase from '@hashicorp/react-enterprise-alert'
/**
@ -193,31 +192,6 @@ function isTopLevelKubeKey(name) {
)
}
// Copied from https://github.com/hashicorp/nextjs-scripts/blob/04917da2191910d490182250d2828372aa1221c0/lib/providers/docs/index.jsx
// because there's no way to import it right now.
function Tabs({ children }) {
if (!Array.isArray(children))
throw new Error('Multiple <Tab> elements required')
return (
<span className={s.tabsRoot}>
<TabsBase
items={children.map((Block) => ({
heading: Block.props.heading,
// eslint-disable-next-line react/display-name
tabChildren: () => Block,
}))}
/>
</span>
)
}
// Copied from https://github.com/hashicorp/nextjs-scripts/blob/04917da2191910d490182250d2828372aa1221c0/lib/providers/docs/index.jsx
// because there's no way to import it right now.
function Tab({ children }) {
return <>{children}</>
}
function EnterpriseAlert(props) {
return <EnterpriseAlertBase product={'consul'} {...props} />
}

View File

@ -52,7 +52,7 @@
"generate:component": "next-hashicorp generate component",
"generate:readme": "next-hashicorp markdown-blocks README.md",
"lint": "next-hashicorp lint",
"start": "rm -rf .next/cache/next-babel-loader/ && next dev",
"start": "next-remote-watch ./content/**/*.mdx",
"static": "npm run build && npm run export && cp _redirects out/.",
"linkcheck": "linkcheck https://consul.io"
}