Merge pull request #1071 from JoeMakuta/feature/optimize-package-imports

feature : optimize package imports
This commit is contained in:
Rohan Verma 2026-04-01 13:03:56 -07:00 committed by GitHub
commit b5ee177f2e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 36 additions and 20 deletions

View file

@ -1,6 +1,6 @@
"use client";
import posthog from "posthog-js";
import { useEffect } from "react";
export default function ErrorPage({
@ -11,7 +11,11 @@ export default function ErrorPage({
reset: () => void;
}) {
useEffect(() => {
posthog.captureException(error);
import("posthog-js")
.then(({ default: posthog }) => {
posthog.captureException(error);
})
.catch(() => {});
}, [error]);
return (