← full-stack-fastapi-template / frontend/src/components/Common/ErrorComponent.tsx
| 1 | import { Link } from "@tanstack/react-router" |
| 2 | import { Button } from "@/components/ui/button" |
| 3 | |
| 4 | const ErrorComponent = () => { |
| 5 | return ( |
| 6 | <div |
| 7 | className="flex min-h-screen items-center justify-center flex-col p-4" |
| 8 | data-testid="error-component" |
| 9 | > |
| 10 | <div className="flex items-center z-10"> |
| 11 | <div className="flex flex-col ml-4 items-center justify-center p-4"> |
| 12 | <span className="text-6xl md:text-8xl font-bold leading-none mb-4"> |
| 13 | Error |
| 14 | </span> |
| 15 | <span className="text-2xl font-bold mb-2">Oops!</span> |
| 16 | </div> |
| 17 | </div> |
| 18 | |
| 19 | <p className="text-lg text-muted-foreground mb-4 text-center z-10"> |
| 20 | Something went wrong. Please try again. |
| 21 | </p> |
| 22 | <Link to="/"> |
| 23 | <Button>Go Home</Button> |
| 24 | </Link> |
| 25 | </div> |
| 26 | ) |
| 27 | } |
| 28 | |
| 29 | export default ErrorComponent |
| 30 |