From e10008ece5f1906db87a695d7d207f57ad8f09d9 Mon Sep 17 00:00:00 2001 From: Thomas Camlong Date: Wed, 1 Oct 2025 15:47:01 +0200 Subject: [PATCH] refactor(web): move development environment check before useEffect hook in Carbon component --- web/src/components/carbon.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/web/src/components/carbon.tsx b/web/src/components/carbon.tsx index 4de6a404..1d7da3dd 100644 --- a/web/src/components/carbon.tsx +++ b/web/src/components/carbon.tsx @@ -1,5 +1,9 @@ import { useEffect, useRef } from "react" export function Carbon() { + if (process.env.NODE_ENV === "development") { + return null + } + useEffect(() => { const serve = "CW7IKKQM" const placement = "dashboardiconscom" @@ -11,9 +15,6 @@ export function Carbon() { }, []) const ref = useRef(null!) - if (process.env.NODE_ENV === "development") { - return null - } return ( <>