Files
sweet/tests/fixture/routes/wildcard.tsx
T
Luca Casonato cbbf616a74 chore: version preact explicitly in import map (#258)
This allows users to control the `preact` version independently of fresh
itself.
2022-06-20 12:37:24 +02:00

16 lines
362 B
TypeScript

/** @jsx h */
import { h } from "preact";
import { PageProps, RouteConfig } from "$fresh/runtime.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: RouteConfig = {
routeOverride: "/foo/:path*",
};