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
This commit is contained in:
Ramesh Kumar Chandra 2023-12-22 14:05:17 +05:30 committed by GitHub
parent a86dafc11c
commit fe9519314a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,8 +47,7 @@ const PosthogWrapper: FC<IPosthogWrapper> = (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<IPosthogWrapper> = (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) {