Skip to content

Commit

Permalink
Merge pull request #99 from JimTheCat/CU-86936x35u_Update-particles-c…
Browse files Browse the repository at this point in the history
…omponent_Patryk-Kosiski

bug: Update particles
  • Loading branch information
JimTheCat authored Jan 7, 2025
2 parents 1a863e1 + 49f25da commit 29b52ad
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {useEffect} from "react";
import React, {useEffect} from "react";
import {loadFull} from "tsparticles";
import {useColorScheme} from "@mantine/hooks";
import type {Container, Engine, IOptions} from "@tsparticles/engine";
import Particles, {initParticlesEngine} from "@tsparticles/react";
import kitty_light from "./assets/kitty_light.svg";
import kitty_dark from "./assets/kitty_dark.svg";

export const ParticleBg = () => {
export const ParticleBg = React.memo(() => {
const colorScheme = useColorScheme();

useEffect(() => {
Expand Down Expand Up @@ -109,10 +109,9 @@ export const ParticleBg = () => {
detectRetina: true,
};


const particlesLoaded = async (container: Container | undefined) => {
console.log(container);
};

return <Particles id="tsparticles" particlesLoaded={particlesLoaded} options={options as IOptions}/>;
};
});

0 comments on commit 29b52ad

Please sign in to comment.