client: fix building with react 18
This commit is contained in:
parent
9df1a22aa7
commit
7d5afbc682
3 changed files with 8 additions and 5 deletions
|
@ -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>) => {
|
||||
|
|
|
@ -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>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ class MyDocument extends Document {
|
|||
{initialProps.styles}
|
||||
{styles}
|
||||
</>
|
||||
)
|
||||
) as any
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue