fix insanely annoying flash

This commit is contained in:
incognitotgt 2024-04-15 20:47:47 -04:00
parent 6b5e863461
commit 82ca99aa5d
No known key found for this signature in database
GPG key ID: D229D19A500C60B0
2 changed files with 3 additions and 4 deletions

View file

@ -6,7 +6,7 @@ import Particles, { initParticlesEngine } from "@tsparticles/react";
import { loadSlim } from "@tsparticles/slim"; import { loadSlim } from "@tsparticles/slim";
import { useEffect, useState } from "preact/compat"; import { useEffect, useState } from "preact/compat";
import { ThemeProvider } from "./components/ThemeProvider"; import { ThemeProvider, useTheme } from "./components/ThemeProvider";
const Routes = lazy(() => import("./routes")); const Routes = lazy(() => import("./routes"));
@ -14,7 +14,7 @@ const particlesUrl = localStorage.getItem("particles") || "none";
export default function App() { export default function App() {
const [init, setInit] = useState(false); const [init, setInit] = useState(false);
const {background} = useTheme();
// this should be run only once per application lifetime // this should be run only once per application lifetime
useEffect(() => { useEffect(() => {
initParticlesEngine(async (engine) => { initParticlesEngine(async (engine) => {
@ -33,7 +33,7 @@ export default function App() {
console.log(container); console.log(container);
}; };
return ( return (
<div> <div className={!background && "bg-primary"}>
{window.location.origin === "https://nebulaproxy.io" && <Meta />} {window.location.origin === "https://nebulaproxy.io" && <Meta />}
{/* {window.location.origin === "http://localhost:8080" && <Meta />} */} {/* {window.location.origin === "http://localhost:8080" && <Meta />} */}
<Suspense fallback={<LoadSuspense />}> <Suspense fallback={<LoadSuspense />}>

View file

@ -6,7 +6,6 @@
@layer base { @layer base {
:root, :root,
.main { .main {
--background-image: url();
--background-primary: #191724; --background-primary: #191724;
--background-lighter: #16121f; --background-lighter: #16121f;
--navbar-color: #26233a; --navbar-color: #26233a;