mirror of
https://github.com/Steffo99/festa.git
synced 2024-12-23 07:04:22 +00:00
17 lines
374 B
TypeScript
17 lines
374 B
TypeScript
|
import { ReactNode, Suspense } from "react"
|
||
|
import { LoadingMain } from "./renderers"
|
||
|
|
||
|
|
||
|
export type LoadingBoundaryProps = {
|
||
|
text?: string,
|
||
|
children: ReactNode,
|
||
|
}
|
||
|
|
||
|
|
||
|
export function LoadingBoundaryPage({ text, children }: LoadingBoundaryProps) {
|
||
|
return (
|
||
|
<Suspense fallback={<LoadingMain text={text} />}>
|
||
|
{children}
|
||
|
</Suspense>
|
||
|
)
|
||
|
}
|