import { HttpError } from "fresh";
import type { PageProps } from "fresh";

export default function ErrorPage(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>
  );
}
