import { Button, Result } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
import { useNavigate } from "react-router-dom";
import { PATH_AUTH } from "utils/constants";

const AccessDenied: React.FC = () => {
  const { t } = useTranslation();
  const navigate = useNavigate();
  return (
    <Result
      status="403"
      title="403"
      subTitle={t("msg-no-auth-warn")}
      style={{ marginTop: "7%" }}
      extra={
        <Button type="primary" onClick={() => navigate(PATH_AUTH.signin)}>
          {t("back to home")}
        </Button>
      }
    />
  );
};

export default AccessDenied;
