import { HttpError } from "fresh";
import { define } from "utils/state.ts";
import type { PageProps } from "fresh";
import PageContainer from "../components/layout/PageContainer.tsx";

export default define.page((props: PageProps) => {
  if (props.error instanceof HttpError && props.error.status === 404) {
    return (
      <PageContainer centered>
        Not Found: {props.url.pathname}
      </PageContainer>
    );
  }
  return (
    <PageContainer centered>
      Something went wrong
    </PageContainer>
  );
});
