@@ -28,7 +28,7 @@ type CurrentPage = {
2828}
2929
3030export interface InertiaAppProps < SharedProps extends PageProps = PageProps > {
31- children ?: ( options : { component : ReactComponent ; props : PageProps ; key : number | null } ) => ReactNode
31+ children ?: ( options : { Component : ReactComponent ; props : PageProps ; key : number | null } ) => ReactNode
3232 initialPage : Page < SharedProps >
3333 initialComponent ?: ReactComponent
3434 resolveComponent ?: ( name : string ) => ReactComponent | Promise < ReactComponent >
@@ -99,15 +99,15 @@ export default function App<SharedProps extends PageProps = PageProps>({
9999
100100 const renderChildren =
101101 children ||
102- ( ( { component , props, key } ) => {
103- const child = createElement ( component , { key, ...props } )
102+ ( ( { Component , props, key } ) => {
103+ const child = createElement ( Component , { key, ...props } )
104104
105- if ( typeof component . layout === 'function' ) {
106- return ( component . layout as LayoutFunction ) ( child )
105+ if ( typeof Component . layout === 'function' ) {
106+ return ( Component . layout as LayoutFunction ) ( child )
107107 }
108108
109- if ( Array . isArray ( component . layout ) ) {
110- return ( component . layout as any )
109+ if ( Array . isArray ( Component . layout ) ) {
110+ return ( Component . layout as any )
111111 . concat ( child )
112112 . reverse ( )
113113 . reduce ( ( children : any , Layout : any ) => createElement ( Layout , { children, ...props } ) )
@@ -123,7 +123,7 @@ export default function App<SharedProps extends PageProps = PageProps>({
123123 PageContext . Provider ,
124124 { value : current . page } ,
125125 renderChildren ( {
126- component : current . component ,
126+ Component : current . component ,
127127 key : current . key ,
128128 props : current . page . props ,
129129 } ) ,
0 commit comments