Fix TypeScript errors in pages dir
Idk why Next made me these files in a way that created React errors but ok! Maybe it was because we didn't have `pages` in the `includes`, so my editor was using the default tsconfig instead of this one?
This commit is contained in:
parent
aceb881b7c
commit
26d7f4220a
4 changed files with 62 additions and 21 deletions
|
@ -10,6 +10,6 @@ import dynamic from "next/dynamic";
|
||||||
// below removed
|
// below removed
|
||||||
const NextIndexWrapper = dynamic(() => import("../src"), { ssr: false });
|
const NextIndexWrapper = dynamic(() => import("../src"), { ssr: false });
|
||||||
|
|
||||||
export default function Page(props) {
|
export default function Page(props: any) {
|
||||||
return <NextIndexWrapper {...props} />;
|
return <NextIndexWrapper {...props} />;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
import Head from 'next/head'
|
import Head from "next/head";
|
||||||
|
import type { AppProps } from "next/app";
|
||||||
|
|
||||||
export default function MyApp({ Component, pageProps}) {
|
export default function DTIApp({ Component, pageProps }: AppProps) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Head>
|
<Head>
|
||||||
<title>Dress to Impress</title>
|
<title>Dress to Impress</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
</Head>
|
</Head>
|
||||||
|
|
||||||
<Component {...pageProps} />
|
<Component {...pageProps} />
|
||||||
</>
|
</>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import Document, { Html, Head, Main, NextScript } from 'next/document'
|
import Document, { Html, Head, Main, NextScript } from "next/document";
|
||||||
|
|
||||||
class MyDocument extends Document {
|
class MyDocument extends Document {
|
||||||
render() {
|
render() {
|
||||||
|
@ -6,11 +6,28 @@ class MyDocument extends Document {
|
||||||
<Html lang="en">
|
<Html lang="en">
|
||||||
<Head>
|
<Head>
|
||||||
<meta charSet="utf-8" />
|
<meta charSet="utf-8" />
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href={`${process.env.PUBLIC_URL}/favicon-32x32.png`} />
|
<link
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href={`${process.env.PUBLIC_URL}/favicon-16x16.png`} />
|
rel="icon"
|
||||||
|
type="image/png"
|
||||||
|
sizes="32x32"
|
||||||
|
href={`${process.env.PUBLIC_URL}/favicon-32x32.png`}
|
||||||
|
/>
|
||||||
|
<link
|
||||||
|
rel="icon"
|
||||||
|
type="image/png"
|
||||||
|
sizes="16x16"
|
||||||
|
href={`${process.env.PUBLIC_URL}/favicon-16x16.png`}
|
||||||
|
/>
|
||||||
<meta name="theme-color" content="#000000" />
|
<meta name="theme-color" content="#000000" />
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href={`${process.env.PUBLIC_URL}/apple-touch-icon.png`} />
|
<link
|
||||||
<style type="text/css" dangerouslySetInnerHTML={{ __html: `
|
rel="apple-touch-icon"
|
||||||
|
sizes="180x180"
|
||||||
|
href={`${process.env.PUBLIC_URL}/apple-touch-icon.png`}
|
||||||
|
/>
|
||||||
|
<style
|
||||||
|
type="text/css"
|
||||||
|
dangerouslySetInnerHTML={{
|
||||||
|
__html: `
|
||||||
/* A font by Jos Buivenga (exljbris) -> www.exljbris.com */
|
/* A font by Jos Buivenga (exljbris) -> www.exljbris.com */
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "Delicious";
|
font-family: "Delicious";
|
||||||
|
@ -25,11 +42,33 @@ class MyDocument extends Document {
|
||||||
font-weight: 800 1000;
|
font-weight: 800 1000;
|
||||||
src: url(/fonts/Delicious-Heavy.otf);
|
src: url(/fonts/Delicious-Heavy.otf);
|
||||||
}
|
}
|
||||||
` }} />
|
`,
|
||||||
<script async="" defer="" data-domain="impress-2020.openneo.net" src="https://plausible.io/js/plausible.js" dangerouslySetInnerHTML={{ __html: `` }} />
|
}}
|
||||||
<link rel="preload" href="/fonts/Delicious-Heavy.otf" type="font/otf" as="font" crossOrigin="" />
|
/>
|
||||||
<link rel="preload" href="/fonts/Delicious-Bold.otf" type="font/otf" as="font" crossOrigin="" />
|
<script
|
||||||
<script dangerouslySetInnerHTML={{ __html: `
|
async
|
||||||
|
defer
|
||||||
|
data-domain="impress-2020.openneo.net"
|
||||||
|
src="https://plausible.io/js/plausible.js"
|
||||||
|
dangerouslySetInnerHTML={{ __html: `` }}
|
||||||
|
/>
|
||||||
|
<link
|
||||||
|
rel="preload"
|
||||||
|
href="/fonts/Delicious-Heavy.otf"
|
||||||
|
type="font/otf"
|
||||||
|
as="font"
|
||||||
|
crossOrigin=""
|
||||||
|
/>
|
||||||
|
<link
|
||||||
|
rel="preload"
|
||||||
|
href="/fonts/Delicious-Bold.otf"
|
||||||
|
type="font/otf"
|
||||||
|
as="font"
|
||||||
|
crossOrigin=""
|
||||||
|
/>
|
||||||
|
<script
|
||||||
|
dangerouslySetInnerHTML={{
|
||||||
|
__html: `
|
||||||
// HACK: This is copy-pasted output from Chakra's <ColorModeScript />. It
|
// HACK: This is copy-pasted output from Chakra's <ColorModeScript />. It
|
||||||
// initializes our color mode to match the system color mode. The
|
// initializes our color mode to match the system color mode. The
|
||||||
// component is built for a special Document element like in
|
// component is built for a special Document element like in
|
||||||
|
@ -62,18 +101,19 @@ class MyDocument extends Document {
|
||||||
root.style.setProperty("--chakra-ui-color-mode", colorMode);
|
root.style.setProperty("--chakra-ui-color-mode", colorMode);
|
||||||
}
|
}
|
||||||
})("system");
|
})("system");
|
||||||
` }} />
|
`,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
</Head>
|
</Head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<Main />
|
<Main />
|
||||||
<NextScript />
|
<NextScript />
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</Html>
|
</Html>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default MyDocument
|
export default MyDocument;
|
||||||
|
|
|
@ -24,6 +24,6 @@
|
||||||
"module": "commonjs"
|
"module": "commonjs"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": ["src"],
|
"include": ["src", "pages"],
|
||||||
"exclude": ["node_modules"]
|
"exclude": ["node_modules"]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue