children: any -> children: ReactNode (#3061)
We use `children: any` in a bunch of places, but the proper type for these is `ReactNode`. This diff fixes those. ### Change Type - [x] `patch` — Bug fix
This commit is contained in:
parent
18a550ccdb
commit
15c760f7ea
36 changed files with 505 additions and 188 deletions
|
@ -1,7 +1,8 @@
|
|||
'use client'
|
||||
|
||||
import { ThemeProvider } from 'next-themes'
|
||||
import { ReactNode } from 'react'
|
||||
|
||||
export function Providers({ children }: { children: any }) {
|
||||
export function Providers({ children }: { children: ReactNode }) {
|
||||
return <ThemeProvider enableSystem>{children}</ThemeProvider>
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
'use client'
|
||||
|
||||
import { useRouter } from 'next/navigation'
|
||||
import { useEffect } from 'react'
|
||||
import { ReactNode, useEffect } from 'react'
|
||||
|
||||
let AutoRefresh = ({ children }: { children: any }) => {
|
||||
let AutoRefresh = ({ children }: { children: ReactNode }) => {
|
||||
return children
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { useEffect, useState, version } from 'react'
|
||||
import { ReactNode, useEffect, useState, version } from 'react'
|
||||
import { LoadingScreen } from 'tldraw'
|
||||
import { useUrl } from '../hooks/useUrl'
|
||||
import { trackAnalyticsEvent } from '../utils/trackAnalyticsEvent'
|
||||
|
@ -47,7 +47,7 @@ export function IFrameProtector({
|
|||
| 'history-snapshot'
|
||||
| 'history'
|
||||
| 'local'
|
||||
children: any
|
||||
children: ReactNode
|
||||
}) {
|
||||
const [embeddedState, setEmbeddedState] = useState<
|
||||
'iframe-unknown' | 'iframe-not-allowed' | 'not-iframe' | 'iframe-ok'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue