import { render } from "preact"; import { Suspense, lazy } from "preact/compat"; import { LoadSuspense } from "./LoadSuspense"; import { Helmet } from "react-helmet"; import Meta from "./components/Meta"; import Particles, { initParticlesEngine } from "@tsparticles/react"; import { loadSlim } from "@tsparticles/slim"; import { useEffect, useState } from "preact/compat"; const Routes = lazy(() => import("./routes")); const theme = localStorage.getItem("theme") || "main"; const particlesUrl = localStorage.getItem("particles") || "none"; export default function App() { const [init, setInit] = useState(false); // this should be run only once per application lifetime useEffect(() => { initParticlesEngine(async (engine) => { // you can initiate the tsParticles instance (engine) here, adding custom shapes or presets // this loads the tsparticles package bundle, it's the easiest method for getting everything ready // starting from v2 you can add only the features you need reducing the bundle size //await loadAll(engine); //await loadFull(engine); await loadSlim(engine); //await loadBasic(engine); }).then(() => { setInit(true); }); }, []); const particlesLoaded = (container) => { console.log(container); }; return (