Error.tsx34 lines · main
| 1 | import Link from 'next/link' |
| 2 | import { useEffect } from 'react' |
| 3 | import { Button } from 'ui' |
| 4 | |
| 5 | import { SupportLink } from '@/components/interfaces/Support/SupportLink' |
| 6 | |
| 7 | export default function EmptyPageState({ error }: any) { |
| 8 | useEffect(() => { |
| 9 | console.error('Error', error) |
| 10 | }, []) |
| 11 | |
| 12 | return ( |
| 13 | <div className="mx-auto flex h-full w-full flex-col items-center justify-center space-y-6"> |
| 14 | <div className="flex w-[320px] flex-col items-center justify-center space-y-3"> |
| 15 | <h4 className="text-lg">Something went wrong 🤕</h4> |
| 16 | <p className="text-center text-sm text-foreground-light"> |
| 17 | Sorry about that, please try again later or feel free to reach out to us if the problem |
| 18 | persists. |
| 19 | </p> |
| 20 | </div> |
| 21 | <div className="flex items-center space-x-4"> |
| 22 | <Button asChild> |
| 23 | <Link href="/projects">Head back</Link> |
| 24 | </Button> |
| 25 | <Button asChild type="secondary"> |
| 26 | <SupportLink>Submit a support request</SupportLink> |
| 27 | </Button> |
| 28 | </div> |
| 29 | <p className="text-sm text-foreground-light"> |
| 30 | Error: [{error?.code}] {error?.message} |
| 31 | </p> |
| 32 | </div> |
| 33 | ) |
| 34 | } |