Reviewed-on: #433 Co-authored-by: miteruzo <miteruzo@naver.com>
このコミットはプルリクエスト #433 でマージされました。
このコミットが含まれているのは:
@@ -0,0 +1,35 @@
|
||||
import type { QueryClient } from '@tanstack/react-query'
|
||||
import type { IndexRouteObject, Location, NonIndexRouteObject, Params } from 'react-router-dom'
|
||||
|
||||
import type { LocaleCode } from '@/lib/locales'
|
||||
|
||||
export type PagePreparation = {
|
||||
client: QueryClient
|
||||
params: Readonly<Params>
|
||||
locale: LocaleCode
|
||||
searchParams: URLSearchParams }
|
||||
|
||||
export type LocaleSwitchRequest = {
|
||||
location: Pick<Location, 'pathname' | 'search' | 'hash'>
|
||||
params: Readonly<Params>
|
||||
locale: LocaleCode
|
||||
targetLocale: LocaleCode }
|
||||
|
||||
export type SitemapSource =
|
||||
'static' | 'help' | 'posts' | 'tags' | 'deerjikists' | 'materials'
|
||||
| 'descriptions' | 'tag_groups' | 'theatres'
|
||||
|
||||
export type PageRouteHandle = {
|
||||
preload?: (locale: LocaleCode) => Promise<unknown>
|
||||
prepare?: (request: PagePreparation) => Promise<number>
|
||||
switchLocale?: (request: LocaleSwitchRequest) => Promise<string>
|
||||
locale?: LocaleCode
|
||||
robots?: 'noindex'
|
||||
authentication?: 'user'
|
||||
sitemap?: SitemapSource[]
|
||||
redirectTo?: string
|
||||
notFound?: boolean }
|
||||
|
||||
export type PageRoute = { handle?: PageRouteHandle } & (
|
||||
Omit<IndexRouteObject, 'handle'>
|
||||
| (Omit<NonIndexRouteObject, 'handle' | 'children'> & { children?: PageRoute[] }))
|
||||
新しいイシューから参照
ユーザーをブロックする