client: fix building with react 18

This commit is contained in:
Max Leiter 2022-04-12 19:19:06 -07:00
parent 9df1a22aa7
commit 7d5afbc682
No known key found for this signature in database
GPG key ID: A3512F2F2F17EBDA
3 changed files with 8 additions and 5 deletions

View file

@ -178,7 +178,7 @@ const Post = ({
[onSubmit]
)
const onChangeExpiration = useCallback((date) => setExpiresAt(date), [])
const onChangeExpiration = useCallback((date: Date) => setExpiresAt(date), [])
const onChangeTitle = useCallback(
(e: ChangeEvent<HTMLInputElement>) => {

View file

@ -5,6 +5,7 @@ import "react-loading-skeleton/dist/skeleton.css"
import Head from "next/head"
import { ThemeProvider } from "next-themes"
import App from "@components/app"
import React from "react"
type AppProps<P = any> = {
pageProps: P
@ -48,9 +49,11 @@ function MyApp({ Component, pageProps }: AppProps) {
<meta name="theme-color" content="#ffffff" />
<title>Drift</title>
</Head>
<ThemeProvider defaultTheme="system" disableTransitionOnChange>
<App Component={Component} pageProps={pageProps} />
</ThemeProvider>
<React.StrictMode>
<ThemeProvider defaultTheme="system" disableTransitionOnChange>
<App Component={Component} pageProps={pageProps} />
</ThemeProvider>
</React.StrictMode>
</div>
)
}

View file

@ -19,7 +19,7 @@ class MyDocument extends Document {
{initialProps.styles}
{styles}
</>
)
) as any
}
}