All files / src/views/error 500.tsx

0% Statements 0/17
0% Branches 0/1
0% Functions 0/1
0% Lines 0/17

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18                                   
import React from 'react';
import { useNavigate } from 'react-router-dom';

export default function Error500() {
  const navigate = useNavigate();

  return (
    <div>
      <h1>抱歉!</h1>
      <h3>您没有权限去该页面...</h3>
      <h3>请联系管理员,或点击下面按钮返回到首页</h3>
      <button type="button" onClick={() => navigate('/')}>
        返回首页
      </button>
    </div>
  );
}