feat: add PageProps to _app (#1229)

This commit is contained in:
kit
2023-05-31 11:13:08 +00:00
committed by GitHub
parent 4e001d5199
commit b558b6e759
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -130,6 +130,10 @@ export async function render<Data>(
children: h(HEAD_CONTEXT.Provider, {
value: headComponents,
children: h(opts.app.default, {
params: opts.params as Record<string, string>,
url: opts.url,
route: opts.route.pattern,
data: opts.data,
Component() {
return h(opts.route.component! as ComponentType<unknown>, props);
},
+1 -1
View File
@@ -116,7 +116,7 @@ export interface Route<Data = any> {
// --- APP ---
export interface AppProps {
export interface AppProps extends PageProps {
Component: ComponentType<Record<never, never>>;
}