feat: setup posthog

This commit is contained in:
Nathnael
2026-07-16 08:52:29 +00:00
parent 6dde17fa4d
commit 318af79962
19 changed files with 513 additions and 190 deletions

View File

@@ -1,5 +1,7 @@
import { Component, type ErrorInfo, type ReactNode } from "react";
import { captureException } from "@/lib/posthog";
interface ErrorBoundaryProps {
children: ReactNode;
}
@@ -21,6 +23,7 @@ export class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundarySt
}
componentDidCatch(error: Error, info: ErrorInfo) {
captureException(error, { componentStack: info.componentStack });
// eslint-disable-next-line no-console
console.error("[ErrorBoundary] Uncaught render error:", error, info.componentStack);
}