index.tsx 583 B

1234567891011121314151617181920212223242526
  1. import { Result } from "antd";
  2. import { useEffect, useRef } from "react";
  3. export default function NotFound() {
  4. const timeRef = useRef(-1);
  5. useEffect(() => {
  6. timeRef.current = window.setTimeout(() => {
  7. const dom: HTMLDivElement = document.querySelector(".noFindPage")!;
  8. dom.style.opacity = "1";
  9. }, 500);
  10. return () => {
  11. clearTimeout(timeRef.current);
  12. };
  13. }, []);
  14. return (
  15. <div className="noFindPage">
  16. <Result
  17. status="404"
  18. title="404"
  19. subTitle="找不到页面,或没有权限!"
  20. />
  21. </div>
  22. );
  23. }