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