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]
|
[onSubmit]
|
||||||
)
|
)
|
||||||
|
|
||||||
const onChangeExpiration = useCallback((date) => setExpiresAt(date), [])
|
const onChangeExpiration = useCallback((date: Date) => setExpiresAt(date), [])
|
||||||
|
|
||||||
const onChangeTitle = useCallback(
|
const onChangeTitle = useCallback(
|
||||||
(e: ChangeEvent<HTMLInputElement>) => {
|
(e: ChangeEvent<HTMLInputElement>) => {
|
||||||
|
|
|
@ -5,6 +5,7 @@ import "react-loading-skeleton/dist/skeleton.css"
|
||||||
import Head from "next/head"
|
import Head from "next/head"
|
||||||
import { ThemeProvider } from "next-themes"
|
import { ThemeProvider } from "next-themes"
|
||||||
import App from "@components/app"
|
import App from "@components/app"
|
||||||
|
import React from "react"
|
||||||
|
|
||||||
type AppProps<P = any> = {
|
type AppProps<P = any> = {
|
||||||
pageProps: P
|
pageProps: P
|
||||||
|
@ -48,9 +49,11 @@ function MyApp({ Component, pageProps }: AppProps) {
|
||||||
<meta name="theme-color" content="#ffffff" />
|
<meta name="theme-color" content="#ffffff" />
|
||||||
<title>Drift</title>
|
<title>Drift</title>
|
||||||
</Head>
|
</Head>
|
||||||
<ThemeProvider defaultTheme="system" disableTransitionOnChange>
|
<React.StrictMode>
|
||||||
<App Component={Component} pageProps={pageProps} />
|
<ThemeProvider defaultTheme="system" disableTransitionOnChange>
|
||||||
</ThemeProvider>
|
<App Component={Component} pageProps={pageProps} />
|
||||||
|
</ThemeProvider>
|
||||||
|
</React.StrictMode>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ class MyDocument extends Document {
|
||||||
{initialProps.styles}
|
{initialProps.styles}
|
||||||
{styles}
|
{styles}
|
||||||
</>
|
</>
|
||||||
)
|
) as any
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue