Unverified Commit 374ca388 authored by Jiachi Liu's avatar Jiachi Liu Committed by GitHub

Update params of PageProps to string map (#41677)

x-ref: #41668

Update `PageProps` to `Record<string, string>`
Co-authored-by: 's avatarJJ Kasper <22380829+ijjk@users.noreply.github.com>
parent 70a128e7
...@@ -25,8 +25,15 @@ type TEntry = typeof entry ...@@ -25,8 +25,15 @@ type TEntry = typeof entry
check<IEntry, TEntry>(entry) check<IEntry, TEntry>(entry)
type PageProps = { params?: any } type PageParams = Record<string, string>
type LayoutProps = { children: React.ReactNode; params?: any } interface PageProps {
params?: PageParams
searchParams?: Record<string, string | string[]>
}
interface LayoutProps {
children: React.ReactNode
params?: PageParams
}
type PageComponent = (props: PageProps) => React.ReactNode | null type PageComponent = (props: PageProps) => React.ReactNode | null
type LayoutComponent = (props: LayoutProps) => React.ReactNode | null type LayoutComponent = (props: LayoutProps) => React.ReactNode | null
...@@ -39,7 +46,7 @@ interface IEntry { ...@@ -39,7 +46,7 @@ interface IEntry {
} }
config?: {} config?: {}
Head?: any Head?: any
generateStaticParams?: (params?:any) => Promise<any[]> generateStaticParams?: (params?: PageParams) => Promise<any[]>
revalidate?: RevalidateRange<TEntry> | false revalidate?: RevalidateRange<TEntry> | false
dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static' dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'
dynamicParams?: boolean dynamicParams?: boolean
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment