* adding posthog libs for node + js * updating lock * move to init posthog client - pageview component * adding identify in shell * removing test event captures * add signout tracking to dropdown as it was missed in merge --------- Co-authored-by: sean <sean@brydon.io> Co-authored-by: Bailey Pumfleet <bailey@pumfleet.co.uk>
15 lines
375 B
TypeScript
15 lines
375 B
TypeScript
import dynamic from "next/dynamic";
|
|
import { Fragment } from "react";
|
|
|
|
const initPostProvider = () => {
|
|
// eslint-disable-next-line turbo/no-undeclared-env-vars
|
|
if (!process.env.NEXT_PUBLIC_POSTHOG_KEY) {
|
|
return Fragment;
|
|
}
|
|
|
|
return dynamic(() => import("./provider"));
|
|
};
|
|
|
|
const DynamicPostHogProvider = initPostProvider();
|
|
export default DynamicPostHogProvider;
|