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 (
      <div className="pd-page pd-page-centered">
        Not Found: {props.url.pathname}
      </div>
    );
  }
  return (
    <div className="pd-page pd-page-centered">
      Something went wrong
    </div>
  );
});
