mirror of
https://github.com/fastapi/full-stack-fastapi-template.git
synced 2026-11-03 20:36:27 +00:00
e44777f919
* Reorganize project directory structure * Allow edit users/items, add useAuth and useCustomToast, password confirmation * Minor improvements for consistency * Add 'Cancel' button to UserInformation in editMode * Refactor UserSettings * Enable user password changes and improve error handling * Enable user information update * Add logout to Sidebar in mobile devices, conditional tabs depending on role and other improvements * Add badges * Remove comment * Appearance tab updates * Change badge color * Reset inputs when clicking on 'Cancel' button * Disable actions menu for Superuser when logged in * Modify Logout and update stores
26 lines
947 B
TypeScript
26 lines
947 B
TypeScript
import { Button, Container, Text } from '@chakra-ui/react';
|
|
import { Link, useRouteError } from 'react-router-dom';
|
|
|
|
const ErrorPage: React.FC = () => {
|
|
const error = useRouteError();
|
|
console.log(error);
|
|
|
|
return (
|
|
<>
|
|
<Container h='100vh'
|
|
alignItems='stretch'
|
|
justifyContent='center' textAlign='center' maxW='xs' centerContent>
|
|
<Text fontSize='8xl' color='ui.main' fontWeight='bold' lineHeight='1' mb={4}>Oops!</Text>
|
|
<Text fontSize='md'>Houston, we have a problem.</Text>
|
|
<Text fontSize='md'>An unexpected error has occurred.</Text>
|
|
{/* <Text color='ui.danger'><i>{error.statusText || error.message}</i></Text> */}
|
|
<Button as={Link} to='/' color='ui.main' borderColor='ui.main' variant='outline' mt={4}>Go back to Home</Button>
|
|
</Container>
|
|
</>
|
|
);
|
|
}
|
|
|
|
export default ErrorPage;
|
|
|
|
|