fix: add route type to props (#3382)
This commit is contained in:
@@ -251,6 +251,7 @@ export class Context<State> {
|
||||
req: this.req,
|
||||
state: this.state,
|
||||
url: this.url,
|
||||
route: this.route,
|
||||
});
|
||||
} else {
|
||||
hasApp = false;
|
||||
|
||||
@@ -61,6 +61,7 @@ export type PageProps<Data = unknown, T = unknown> =
|
||||
| "isPartial"
|
||||
| "Component"
|
||||
| "error"
|
||||
| "route"
|
||||
>
|
||||
& { data: Data };
|
||||
|
||||
@@ -85,6 +86,7 @@ export async function renderRouteComponent<State>(
|
||||
req: ctx.req,
|
||||
state: ctx.state,
|
||||
url: ctx.url,
|
||||
route: ctx.route,
|
||||
};
|
||||
|
||||
if (isAsyncAnyComponent(def.component)) {
|
||||
|
||||
Reference in New Issue
Block a user