File tree Expand file tree Collapse file tree 6 files changed +27
-25
lines changed
tuono-tutorial/src/routes Expand file tree Collapse file tree 6 files changed +27
-25
lines changed Original file line number Diff line number Diff line change 1- import type { ReactNode , JSX } from 'react'
1+ import type { JSX } from 'react'
22import { TuonoScripts } from 'tuono'
3+ import type { TuonoLayoutProps } from 'tuono'
34
45import '../styles/global.css'
56
6- interface RootLayoutProps {
7- children : ReactNode
8- }
9-
10- export default function RootLayout ( { children } : RootLayoutProps ) : JSX . Element {
7+ export default function RootLayout ( {
8+ children,
9+ } : TuonoLayoutProps ) : JSX . Element {
1110 return (
1211 < html >
1312 < body >
Original file line number Diff line number Diff line change 1- import type { ReactNode , JSX } from 'react'
1+ import type { JSX } from 'react'
22import { TuonoScripts } from 'tuono'
3+ import type { TuonoLayoutProps } from 'tuono'
34
45import '../styles/global.css'
56
6- interface RootLayoutProps {
7- children : ReactNode
8- }
9-
10- export default function RootLayout ( { children } : RootLayoutProps ) : JSX . Element {
7+ export default function RootLayout ( {
8+ children,
9+ } : TuonoLayoutProps ) : JSX . Element {
1110 return (
1211 < html >
1312 < body >
Original file line number Diff line number Diff line change 1- import type { ReactNode , JSX } from 'react'
1+ import type { JSX } from 'react'
22import { MDXProvider } from '@mdx-js/react'
33import { TuonoScripts } from 'tuono'
4+ import type { TuonoLayoutProps } from 'tuono'
45
56import '../styles/global.css'
67
7- interface RootLayoutProps {
8- children : ReactNode
9- }
10-
11- export default function RootLayout ( { children } : RootLayoutProps ) : JSX . Element {
8+ export default function RootLayout ( {
9+ children,
10+ } : TuonoLayoutProps ) : JSX . Element {
1211 return (
1312 < html >
1413 < body >
Original file line number Diff line number Diff line change 1- import type { ReactNode , JSX } from 'react'
1+ import type { JSX } from 'react'
22import { TuonoScripts } from 'tuono'
3+ import type { TuonoLayoutProps } from 'tuono'
34
45import '../styles/global.css'
56
6- interface RootLayoutProps {
7- children : ReactNode
8- }
9-
10- export default function RootLayout ( { children } : RootLayoutProps ) : JSX . Element {
7+ export default function RootLayout ( {
8+ children,
9+ } : TuonoLayoutProps ) : JSX . Element {
1110 return (
1211 < html >
1312 < head >
Original file line number Diff line number Diff line change @@ -13,4 +13,4 @@ export {
1313
1414export { TuonoScripts } from './shared/TuonoScripts'
1515
16- export type { TuonoRouteProps } from './types'
16+ export type { TuonoRouteProps , TuonoLayoutProps } from './types'
Original file line number Diff line number Diff line change 1+ import type { ReactNode } from 'react'
2+
13/**
24 * Provided by the rust server and used in the ssr env
35 * @see tuono-router {@link ServerInitialLocation}
@@ -56,3 +58,7 @@ export type TuonoRouteProps<TData> =
5658 data : TData
5759 isLoading : false
5860 }
61+
62+ export interface TuonoLayoutProps {
63+ children : ReactNode
64+ }
You can’t perform that action at this time.
0 commit comments