import { Fragment } from "react/jsx-runtime"; import { lootboxes } from "../../../shared/lootboxes"; import { Button } from "../../components/Button"; import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger, } from "../../components/Dialog"; import GemsIcon from "../../components/GemIcon"; import { themes } from "../../themes"; import { useWSMutation } from "../../hooks"; import { Rarity } from "../../components/Rarity"; import { lootboxResultAtom } from "../../atoms"; import { useAtom } from "jotai"; import { useEffect } from "react"; import Particles, { initParticlesEngine } from "@tsparticles/react"; import { loadSlim } from "@tsparticles/slim"; import { loadSeaAnemonePreset } from "@tsparticles/preset-sea-anemone"; import { motion } from "framer-motion"; const Store = () => { const openLootbox = useWSMutation("user.openLootbox"); const [lootboxResult, setLootboxResult] = useAtom(lootboxResultAtom); const currentLootbox = lootboxes.find((l) => l.id === lootboxResult?.lootbox); // 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 loadSeaAnemonePreset(engine); //await loadBasic(engine); }); }, []); return ( <>