From fe9519314afefa190d0fa82a368a57d0b9385b8e Mon Sep 17 00:00:00 2001 From: Ramesh Kumar Chandra <31303617+rameshkumarchandra@users.noreply.github.com> Date: Fri, 22 Dec 2023 14:05:17 +0530 Subject: [PATCH] fix: posthog events trigger in staging (#3220) * fix: posthog events trigger in staging * refactor: cleared comment lines for warnings, added dependancy values * refactor: removed unnecessary dependency --- web/lib/wrappers/posthog-wrapper.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/web/lib/wrappers/posthog-wrapper.tsx b/web/lib/wrappers/posthog-wrapper.tsx index 1e7c35c0d..9c17ee2bd 100644 --- a/web/lib/wrappers/posthog-wrapper.tsx +++ b/web/lib/wrappers/posthog-wrapper.tsx @@ -47,8 +47,7 @@ const PosthogWrapper: FC = (props) => { capture_pageview: false, // Disable automatic pageview capture, as we capture manually }); } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); + }, [posthogAPIKey, posthogHost]); useEffect(() => { // Track page views @@ -60,7 +59,7 @@ const PosthogWrapper: FC = (props) => { return () => { router.events.off("routeChangeComplete", handleRouteChange); }; - // eslint-disable-next-line react-hooks/exhaustive-deps + // eslint-disable-next-line react-hooks/exhaustive-deps }, []); if (posthogAPIKey) {