vector / frontend /src /app /error.tsx
d-ragon's picture
Upload 674 files
689359a verified
Raw History Blame Contribute Delete
497 Bytes
"use client";
import { useEffect } from "react";
import posthog from "posthog-js";
import { PageError } from "@/components/app/page-state";
import { isPostHogEnabled } from "@/lib/posthog";
export default function ErrorPage({ error, reset }: { error: Error & { digest?: string }; reset: () => void }) {
useEffect(() => {
if (isPostHogEnabled) posthog.captureException(error);
}, [error]);
return <PageError message="We couldn't load this page. Please try again." retry={reset} />;
}