I am starting to learn Typescript and wanted to change all my javascript files in my NextAuth project to ts, but I can't make my _app.tsx file work. It looks like this:
import { SessionProvider } from "next-auth/react"
function MyApp({ Component, pageProps: { session, ...pageProps } }) {
return (
<SessionProvider session={session}>
<div className="flex min-h-screen w-full flex-col items-center bg-base-100 text-gray-300">
<Component {...pageProps} />
</div>
</SessionProvider>
)
}
export default MyApp
There are errors and I would be greatful for someone to correct it by implementing all the necessary types. I've tried adding AppProps type like shown here, but it doesn't seem to work. Thanks in advance.