import { Result } from "antd";
import { useEffect, useRef } from "react";

export default function NotFound() {
  const timeRef = useRef(-1);

  useEffect(() => {
    timeRef.current = window.setTimeout(() => {
      const dom: any = document.querySelector(".noFindPage");
      dom.style.opacity = 1;
    }, 200);
    return () => {
      clearTimeout(timeRef.current);
    };
  }, []);

  return (
    <div className="noFindPage">
      <Result
        status="404"
        title="404"
        subTitle="页面找不到或没有权限，请联系管理员!"
      />
    </div>
  );
}
