import { HttpError } from "fresh"; import { define } from "utils/state.ts"; import type { PageProps } from "fresh"; export default define.page((props: PageProps) => { if (props.error instanceof HttpError && props.error.status === 404) { return (
Not Found: {props.url.pathname}
); } return (
Something went wrong
); });