remove unused vars blocking lab and dev builds
This commit is contained in:
parent
994ce05168
commit
3f77ba58c0
18 changed files with 752 additions and 599 deletions
|
@ -9,8 +9,7 @@ import HelpUs from 'site/components/help-us.js'
|
|||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
||||
import jargon from 'site/jargon.mjs'
|
||||
|
||||
const MdxPage = props => {
|
||||
|
||||
const MdxPage = (props) => {
|
||||
// This hook is used for shared code and global state
|
||||
const app = useApp()
|
||||
|
||||
|
@ -27,21 +26,25 @@ const MdxPage = props => {
|
|||
<Page app={app} {...props.page}>
|
||||
<Head>
|
||||
<meta property="og:title" content={props.page.title} key="title" />
|
||||
<meta property="og:type" content="article" key='type' />
|
||||
<meta property="og:description" content={props.intro} key='type' />
|
||||
<meta property="og:article:author" content='Joost De Cock' key='author' />
|
||||
<meta property="og:image" content={`https://canary.backend.freesewing.org/og-img/en/dev/${props.page.slug}`} key='image' />
|
||||
<meta property="og:type" content="article" key="type" />
|
||||
<meta property="og:description" content={props.intro} key="type" />
|
||||
<meta property="og:article:author" content="Joost De Cock" key="author" />
|
||||
<meta
|
||||
property="og:image"
|
||||
content={`https://canary.backend.freesewing.org/og-img/en/dev/${props.page.slug}`}
|
||||
key="image"
|
||||
/>
|
||||
<meta property="og:image:type" content="image/png" />
|
||||
<meta property="og:image:width" content="1200" />
|
||||
<meta property="og:image:height" content="630" />
|
||||
<meta property="og:url" content={`https://freesewing.dev/${props.page.slug}`} key='url' />
|
||||
<meta property="og:locale" content="en_US" key='locale' />
|
||||
<meta property="og:site_name" content="freesewing.dev" key='site' />
|
||||
<meta property="og:url" content={`https://freesewing.dev/${props.page.slug}`} key="url" />
|
||||
<meta property="og:locale" content="en_US" key="locale" />
|
||||
<meta property="og:site_name" content="freesewing.dev" key="site" />
|
||||
</Head>
|
||||
<div className="flex flex-row-reverse flex-wrap xl:flex-nowrap justify-end px-8 xl:px-0">
|
||||
{props.toc && (
|
||||
<div className="mb-8 px-0 w-full xl:w-80 2xl:w-96 xl:pl-8 2xl:pl-16">
|
||||
<TocWrapper toc={props.toc} app={app}/>
|
||||
<TocWrapper toc={props.toc} app={app} />
|
||||
</div>
|
||||
)}
|
||||
<div className="px-0 xl:pl-8 2xl:pl-16">
|
||||
|
@ -58,7 +61,6 @@ const MdxPage = props => {
|
|||
*/
|
||||
export default MdxPage
|
||||
|
||||
|
||||
/*
|
||||
* getStaticProps() is used to fetch data at build-time.
|
||||
*
|
||||
|
@ -70,8 +72,7 @@ export default MdxPage
|
|||
*
|
||||
* To learn more, see: https://nextjs.org/docs/basic-features/data-fetching
|
||||
*/
|
||||
export async function getStaticProps({ params, locale }) {
|
||||
|
||||
export async function getStaticProps({ params }) {
|
||||
const { mdx, intro, toc } = await mdxLoader('en', 'dev', params.mdxslug.join('/'), jargon)
|
||||
|
||||
return {
|
||||
|
@ -87,7 +88,7 @@ export async function getStaticProps({ params, locale }) {
|
|||
},
|
||||
params,
|
||||
...(await serverSideTranslations('en')),
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -104,8 +105,7 @@ export async function getStaticProps({ params, locale }) {
|
|||
*/
|
||||
export async function getStaticPaths() {
|
||||
return {
|
||||
paths: Object.keys(mdxMeta).map(slug => '/'+slug),
|
||||
fallback: false
|
||||
paths: Object.keys(mdxMeta).map((slug) => '/' + slug),
|
||||
fallback: false,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue