diff --git a/src/components/ThemeProvider.tsx b/src/components/ThemeProvider.tsx index 6592ca8..9afdf47 100644 --- a/src/components/ThemeProvider.tsx +++ b/src/components/ThemeProvider.tsx @@ -54,10 +54,12 @@ export function ThemeProvider({ children, ...props }: ThemeProviderProps) { root.classList.remove(theme); }); root.classList.add(theme); - document.documentElement.style.setProperty( - "--background-image", - `url(${background})` - ); + if (background) { + document.documentElement.style.setProperty( + "--background-image", + `url(${background})` + ); + } }, [theme, themes, background]); const value = { diff --git a/src/index.tsx b/src/index.tsx index 98c629e..ae0594b 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -14,7 +14,7 @@ const particlesUrl = localStorage.getItem("particles") || "none"; export default function App() { const [init, setInit] = useState(false); - const {background} = useTheme(); + const { background } = useTheme(); // this should be run only once per application lifetime useEffect(() => { initParticlesEngine(async (engine) => { @@ -33,18 +33,22 @@ export default function App() { console.log(container); }; return ( -
+
{window.location.origin === "https://nebulaproxy.io" && } {/* {window.location.origin === "http://localhost:8080" && } */} }> - -
+
+ +
+
{init && particlesUrl !== "none" && ( )}