From 49188a813882e0a34dc8e23bf24b7a448df1feaf Mon Sep 17 00:00:00 2001 From: rtay1188 Date: Tue, 14 Jan 2025 00:17:11 -0800 Subject: [PATCH] fix typing --- src/pages/_app.tsx | 2 +- src/pages/_document.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 1b58916..a350c4f 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -2,7 +2,7 @@ import "@/styles/globals.css"; import type { AppProps } from "next/app"; import { AppCacheProvider } from '@mui/material-nextjs/v15-pagesRouter'; -export default function App({ Component, pageProps }: AppProps, props: any) { +export default function App({ Component, pageProps, ...props }: AppProps) { return ( ; diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx index 24a4665..644e5b5 100644 --- a/src/pages/_document.tsx +++ b/src/pages/_document.tsx @@ -1,7 +1,7 @@ -import { Html, Head, Main, NextScript } from "next/document"; +import { Html, Head, Main, NextScript, DocumentContext } from "next/document"; import { DocumentHeadTags, DocumentHeadTagsProps, documentGetInitialProps } from '@mui/material-nextjs/v15-pagesRouter'; -export default function Document(props: any & DocumentHeadTagsProps) { +export default function Document(props: DocumentHeadTagsProps) { return ( @@ -15,7 +15,7 @@ export default function Document(props: any & DocumentHeadTagsProps) { ); } -Document.getInitialProps = async (ctx: any) => { +Document.getInitialProps = async (ctx: DocumentContext) => { const finalProps = await documentGetInitialProps(ctx); return finalProps; }; \ No newline at end of file