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) {