From b42dc711e641dbf3df4e996052ab4c9e6cb78578 Mon Sep 17 00:00:00 2001 From: Hamir Mahal Date: Mon, 17 Jun 2024 11:38:53 -0700 Subject: [PATCH] refactor: remove `debug` setting from `init` call (#62) --- src/pages/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 6422d2c..7f1dd59 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -4,11 +4,13 @@ import { ChakraProvider } from "@chakra-ui/react"; import mixpanel from "mixpanel-browser"; import React from "react"; +const debug = process.env.NODE_ENV === "development"; + export default function Home() { React.useEffect(() => { if (process.env.NEXT_PUBLIC_MIXPANEL_TOKEN) { mixpanel.init(process.env.NEXT_PUBLIC_MIXPANEL_TOKEN, { - debug: true, + debug, track_pageview: true, persistence: "localStorage", });