mirror of
https://github.com/NebulaServices/Nebula.git
synced 2025-05-17 13:30:00 -04:00
fix insanely annoying flash
This commit is contained in:
parent
6b5e863461
commit
82ca99aa5d
2 changed files with 3 additions and 4 deletions
|
@ -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 />}>
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue