import Button from "@/components/ui/Button";
import { withTitle } from "@/constructors/Component";
import { UrlsTitle } from "@/enums/urls";
import { FunctionComponent } from "preact";
import { useLocation } from "preact-iso";
import classes from "./404.module.scss";

const Page404: FunctionComponent = () => {
  const { route } = useLocation();
  return (
    <div id={classes.container}>
      <div id={classes.main_container}>
        <p class="text-6xl font-semibold">404</p>
        <Button
          onClick={() => {
            route("/", true);
          }}
          color="secondary"
        >
          На главную
        </Button>
      </div>
    </div>
  );
};

export default withTitle(UrlsTitle.PAGE404, Page404);
