chore: rename PageConfig to RouteConfig (#202)
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
/** @jsx h */
|
||||
|
||||
import { h, PageConfig, PageProps } from "../../client_deps.ts";
|
||||
import { h, PageProps, RouteConfig } from "../../client_deps.ts";
|
||||
|
||||
export default function Page(props: PageProps) {
|
||||
return <div>Book {props.params.id}</div>;
|
||||
}
|
||||
|
||||
export const config: PageConfig = {
|
||||
export const config: RouteConfig = {
|
||||
routeOverride: "/books/:id(\\d+)",
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @jsx h */
|
||||
|
||||
import { h, PageConfig } from "../client_deps.ts";
|
||||
import { h, RouteConfig } from "../client_deps.ts";
|
||||
import { HandlerContext } from "../../../server.ts";
|
||||
|
||||
export const handler = {
|
||||
@@ -9,6 +9,6 @@ export const handler = {
|
||||
},
|
||||
};
|
||||
|
||||
export const config: PageConfig = {
|
||||
export const config: RouteConfig = {
|
||||
routeOverride: "/params/:path*",
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @jsx h */
|
||||
|
||||
import { h, PageConfig, PageProps } from "../client_deps.ts";
|
||||
import { h, PageProps, RouteConfig } from "../client_deps.ts";
|
||||
|
||||
export default function WildcardPage({ params }: PageProps) {
|
||||
if (typeof params.path === "string") {
|
||||
@@ -10,6 +10,6 @@ export default function WildcardPage({ params }: PageProps) {
|
||||
}
|
||||
}
|
||||
|
||||
export const config: PageConfig = {
|
||||
export const config: RouteConfig = {
|
||||
routeOverride: "/foo/:path*",
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user