From 26d7f4220a6b111aaa143d97aa9178c82e80ef67 Mon Sep 17 00:00:00 2001 From: Matchu Date: Wed, 14 Sep 2022 18:04:10 -0700 Subject: [PATCH] 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? --- pages/[[...slug]].tsx | 2 +- pages/_app.tsx | 9 +++--- pages/_document.tsx | 70 +++++++++++++++++++++++++++++++++---------- tsconfig.json | 2 +- 4 files changed, 62 insertions(+), 21 deletions(-) diff --git a/pages/[[...slug]].tsx b/pages/[[...slug]].tsx index 8015020..7c9ad24 100644 --- a/pages/[[...slug]].tsx +++ b/pages/[[...slug]].tsx @@ -10,6 +10,6 @@ import dynamic from "next/dynamic"; // below removed const NextIndexWrapper = dynamic(() => import("../src"), { ssr: false }); -export default function Page(props) { +export default function Page(props: any) { return ; } diff --git a/pages/_app.tsx b/pages/_app.tsx index 63943a4..12a8f4a 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -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 ( <> Dress to Impress - + - ) + ); } diff --git a/pages/_document.tsx b/pages/_document.tsx index d7890a9..9c6c392 100644 --- a/pages/_document.tsx +++ b/pages/_document.tsx @@ -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 { render() { @@ -6,11 +6,28 @@ class MyDocument extends Document { - - + + - -