You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
954 B

1 year ago
1 year ago
1 year ago
1 year ago
  1. import { useTranslation } from '@/i18n.ts'
  2. import { useNavigate } from '@tanstack/react-router'
  3. import { Button, Result } from 'antd'
  4. import { useAtomValue } from 'jotai'
  5. import { userMenuDataAtom } from '@/store/system/user.ts'
  6. const NotFound = () => {
  7. const navigate = useNavigate()
  8. const { t } = useTranslation()
  9. const { data } = useAtomValue(userMenuDataAtom)
  10. if (!data) {
  11. return null
  12. }
  13. return (
  14. <Result
  15. className="error-page"
  16. status="404"
  17. title={t('error.404.title')}
  18. subTitle={t('error.404.message')}
  19. extra={
  20. <Button type="primary" onClick={() => navigate({
  21. to: '../'
  22. })}>
  23. {t('route.goBack')}
  24. </Button>
  25. }
  26. />
  27. )
  28. }
  29. export default NotFound