Skip to content

Commit

Permalink
fixes posthog effect
Browse files Browse the repository at this point in the history
  • Loading branch information
nickzelei committed Jun 24, 2024
1 parent fe56ccf commit 2843646
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/login/Template.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,11 @@ export default function Template(props: TemplateProps<KcContext, I18n>) {

const { auth, url, message, isAppInitiatedAction } = kcContext;

const POSTHOG_KEY = "poieowepwer";

useEffect(() => {
posthog.init(POSTHOG_KEY ?? "fake-key", {
api_host: POSTHOG_KEY,
posthog.init(kcContext.properties.POSTHOG_KEY ?? "fake-key", {
api_host: kcContext.properties.POSTHOG_HOST,
});
}, [POSTHOG_KEY, POSTHOG_KEY]);
}, [kcContext?.properties?.POSTHOG_KEY, kcContext?.properties?.POSTHOG_HOST]);

const { isReady } = usePrepareTemplate({
doFetchDefaultThemeResources: doUseDefaultCss,
Expand Down

0 comments on commit 2843646

Please sign in to comment.