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 Error404() { const navigate = useNavigate(); return ( <div> <h1>抱歉!</h1> <h3>当前页面不存在...</h3> <h3>请检查您输入的网址是否正确,或点击下面的按钮返回首页</h3> <button type="button" onClick={() => navigate('/')}> 返回首页 </button> </div> ); } |