Skip to content

Commit

Permalink
fix(firework): removing unnecessary autoplay prop
Browse files Browse the repository at this point in the history
  • Loading branch information
mateoguzmana committed Aug 14, 2022
1 parent c87e728 commit 3ebc760
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
1 change: 0 additions & 1 deletion example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ function App() {
<Canvas style={styles.canvas}>
<Firework
color="blue"
autoplay={false}
particlesInitialPosition={{ x: 0, y: 50 }}
particlesFinalposition={{
xValues: fireworksPositions?.xValues ?? [],
Expand Down
3 changes: 0 additions & 3 deletions src/components/Firework.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,12 @@ interface FireworkProps {
particlesFinalposition?: FireworkParticlePositions;
particlesInitialPosition?: FireworkPosition;
color: string;
autoplay?: boolean;
}

function Firework({
particlesFinalposition,
color,
particlesInitialPosition,
autoplay,
}: FireworkProps) {
return (
<>
Expand All @@ -46,7 +44,6 @@ function Firework({
}}
r={8}
color={color ?? '#000'}
autoplay={autoplay}
/>
))}
</>
Expand Down
6 changes: 2 additions & 4 deletions src/components/FireworkParticle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ interface FireworkParticleProps {
};
r: number;
color: string;
autoplay?: boolean;
}

function FireworkParticle({
Expand All @@ -27,7 +26,6 @@ function FireworkParticle({
finalPos,
r,
color,
autoplay,
}: FireworkParticleProps) {
const xPosition = useValue(x);
const yPosition = useValue(y);
Expand Down Expand Up @@ -74,8 +72,8 @@ function FireworkParticle({
}, [changeOpacity, changeXPosition, changeYPosition]);

useEffect(() => {
true && pushBalloons();
}, [autoplay, pushBalloons]);
pushBalloons();
}, [pushBalloons]);

return (
<Group transform={transform}>
Expand Down

0 comments on commit 3ebc760

Please sign in to comment.