import { type ErrorRouteComponent, Link } from '@tanstack/react-router'; import { usePostHog } from 'posthog-js/react'; import { useEffect } from 'react'; import { Button } from '@/components/ui/buttons'; import { Card, CardContent, CardFooter } from '@/components/ui/card/CardBase'; const ErrorCard = () => { return (

Looks like we hit an unexpected error

{`Our team has been notified via Slack. We'll take a look at the issue ASAP and get back to you.`}
); }; export const GlobalErrorCard: ErrorRouteComponent = ({ error }) => { const posthog = usePostHog(); useEffect(() => { const isPosthogLoaded = posthog.__loaded; if (isPosthogLoaded) { posthog.captureException(error); } console.error(error); }, [error]); return ; };