From 3ebc760724f4380e07966e8372d310102f8c8fbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateo=20Guzm=C3=A1n?= Date: Sun, 14 Aug 2022 08:51:43 +0200 Subject: [PATCH] fix(firework): removing unnecessary autoplay prop --- example/src/App.tsx | 1 - src/components/Firework.tsx | 3 --- src/components/FireworkParticle.tsx | 6 ++---- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/example/src/App.tsx b/example/src/App.tsx index 94d3c27..10d3522 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -83,7 +83,6 @@ function App() { @@ -46,7 +44,6 @@ function Firework({ }} r={8} color={color ?? '#000'} - autoplay={autoplay} /> ))} diff --git a/src/components/FireworkParticle.tsx b/src/components/FireworkParticle.tsx index 99538c0..0a585ee 100644 --- a/src/components/FireworkParticle.tsx +++ b/src/components/FireworkParticle.tsx @@ -18,7 +18,6 @@ interface FireworkParticleProps { }; r: number; color: string; - autoplay?: boolean; } function FireworkParticle({ @@ -27,7 +26,6 @@ function FireworkParticle({ finalPos, r, color, - autoplay, }: FireworkParticleProps) { const xPosition = useValue(x); const yPosition = useValue(y); @@ -74,8 +72,8 @@ function FireworkParticle({ }, [changeOpacity, changeXPosition, changeYPosition]); useEffect(() => { - true && pushBalloons(); - }, [autoplay, pushBalloons]); + pushBalloons(); + }, [pushBalloons]); return (