fix: PageProps.params never contains arrays, only strings (#91)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
/** @jsx h */
|
||||
|
||||
import { h, PageConfig, PageProps } from "../deps.ts";
|
||||
|
||||
export default function WildcardPage({ params }: PageProps) {
|
||||
if (typeof params.path === "string") {
|
||||
return <p>{params.path}</p>;
|
||||
} else {
|
||||
return <p>Not a string.</p>;
|
||||
}
|
||||
}
|
||||
|
||||
export const config: PageConfig = {
|
||||
routeOverride: "/foo/:path*",
|
||||
};
|
||||
Reference in New Issue
Block a user