UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.
Update particles-demo.tsx (#286)
Kamil Marczak35818bfe66b0
diff --git a/registry/default/example/particles-demo.tsx b/registry/default/example/particles-demo.tsxindex 74f9ad5e..c65669ac 100644--- a/registry/default/example/particles-demo.tsx+++ b/registry/default/example/particles-demo.tsx@@ -6,12 +6,12 @@ import { useTheme } from "next-themes";import Particles from "@/registry/default/magicui/particles";export default function ParticlesDemo() {- const { theme } = useTheme();+ const { resolvedTheme } = useTheme();const [color, setColor] = useState("#ffffff");useEffect(() => {- setColor(theme === "dark" ? "#ffffff" : "#000000");- }, [theme]);+ setColor(resolvedTheme === "dark" ? "#ffffff" : "#000000");+ }, [resolvedTheme]);return (<div className="relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl">