"use client"; import { ExternalLink } from "lucide-react"; import Link from "next/link"; import { useEffect, useMemo } from "react"; import { buildIssueUrl } from "@/lib/error-toast"; export default function DashboardError({ error, reset, }: { error: globalThis.Error & { digest?: string; code?: string; requestId?: string }; reset: () => void; }) { useEffect(() => { import("posthog-js") .then(({ default: posthog }) => { posthog.captureException(error); }) .catch(() => {}); }, [error]); const issueUrl = useMemo(() => buildIssueUrl(error), [error]); return (
An error occurred in this section. Your dashboard is still available. If this keeps happening, please report it so we can fix it.
{(error.digest || error.code || error.requestId) && (