fix: build errors

This commit is contained in:
sriram veeraghanta 2024-05-28 15:11:54 +05:30
parent 36b82a7776
commit c87749cbda
2 changed files with 4 additions and 9 deletions

View file

@ -75,7 +75,9 @@ const PostHogProvider: FC<IPosthogWrapper> = (props) => {
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
if (posthogAPIKey) return <PHProvider client={posthog}>{children}</PHProvider>;
if (process.env.NEXT_PUBLIC_POSTHOG_KEY && process.env.NEXT_PUBLIC_POSTHOG_HOST)
return <PHProvider client={posthog}>{children}</PHProvider>;
return <>{children}</>;
};