Error.tsx 1.1 KB

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