mirror of
https://github.com/walkxcode/dashboard-icons.git
synced 2025-11-19 01:57:29 +01:00
refactor(web): move development environment check before useEffect hook in Carbon component
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
import { useEffect, useRef } from "react"
|
import { useEffect, useRef } from "react"
|
||||||
export function Carbon() {
|
export function Carbon() {
|
||||||
|
if (process.env.NODE_ENV === "development") {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const serve = "CW7IKKQM"
|
const serve = "CW7IKKQM"
|
||||||
const placement = "dashboardiconscom"
|
const placement = "dashboardiconscom"
|
||||||
@@ -11,9 +15,6 @@ export function Carbon() {
|
|||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
const ref = useRef<HTMLDivElement>(null!)
|
const ref = useRef<HTMLDivElement>(null!)
|
||||||
if (process.env.NODE_ENV === "development") {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
Reference in New Issue
Block a user