From 342889022c82cc020cdcac9535e8b2f8e89610f7 Mon Sep 17 00:00:00 2001 From: ConnorYoh <40631091+ConnorYoh@users.noreply.github.com> Date: Fri, 29 Aug 2025 13:58:59 +0100 Subject: [PATCH] Update frontend/src/index.tsx Co-authored-by: James Brunton --- frontend/src/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/index.tsx b/frontend/src/index.tsx index ff906a47a..55fe7f046 100644 --- a/frontend/src/index.tsx +++ b/frontend/src/index.tsx @@ -30,7 +30,7 @@ posthog.init(import.meta.env.VITE_PUBLIC_POSTHOG_KEY, { opt_out_capturing_by_default: false, // We handle opt-out via cookie consent }); -function UpdatePosthogConsent(){ +function updatePosthogConsent(){ if(typeof(posthog) == "undefined") { return; } @@ -41,8 +41,8 @@ function UpdatePosthogConsent(){ console.log("Updated analytics consent: ", optIn? "opted in" : "opted out"); } -window.addEventListener("cc:onConsent", UpdatePosthogConsent); -window.addEventListener("cc:onChange", UpdatePosthogConsent); +window.addEventListener("cc:onConsent", updatePosthogConsent); +window.addEventListener("cc:onChange", updatePosthogConsent); const container = document.getElementById('root'); if (!container) {