feat: add PageProps to _app (#1229)
This commit is contained in:
@@ -130,6 +130,10 @@ export async function render<Data>(
|
|||||||
children: h(HEAD_CONTEXT.Provider, {
|
children: h(HEAD_CONTEXT.Provider, {
|
||||||
value: headComponents,
|
value: headComponents,
|
||||||
children: h(opts.app.default, {
|
children: h(opts.app.default, {
|
||||||
|
params: opts.params as Record<string, string>,
|
||||||
|
url: opts.url,
|
||||||
|
route: opts.route.pattern,
|
||||||
|
data: opts.data,
|
||||||
Component() {
|
Component() {
|
||||||
return h(opts.route.component! as ComponentType<unknown>, props);
|
return h(opts.route.component! as ComponentType<unknown>, props);
|
||||||
},
|
},
|
||||||
|
|||||||
+1
-1
@@ -116,7 +116,7 @@ export interface Route<Data = any> {
|
|||||||
|
|
||||||
// --- APP ---
|
// --- APP ---
|
||||||
|
|
||||||
export interface AppProps {
|
export interface AppProps extends PageProps {
|
||||||
Component: ComponentType<Record<never, never>>;
|
Component: ComponentType<Record<never, never>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user