Skip to content

Commit b05e7ac

Browse files
committed
Fix Reward = Time animation by properly applying framer-motion properties
Animation Fix: - Changed from spreading animation config object to explicitly setting animate and transition props - motion.g elements now properly receive animate={animationConfig?.color1?.animate} - motion.g elements now properly receive transition={animationConfig?.color1?.transition} - This ensures framer-motion can properly apply the pulse scale animation The Reward = Time animation should now work correctly with: - Gentle pulse scale (1.08 max) for color1 - Subtle scale (0.95 min) for color2 with 0.5s delay - 3s duration with easeInOut for smooth pulsing effect This fixes the issue where the animation configuration wasn't being properly applied to the motion elements.
1 parent 6159460 commit b05e7ac

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/Avatar.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ function AvatarFallback({
167167

168168
{/* First animated color layer */}
169169
<motion.g
170-
{...(animationConfig?.color1 || {})}
170+
animate={animationConfig?.color1?.animate}
171+
transition={animationConfig?.color1?.transition}
171172
style={{
172173
transformOrigin: `${size / 2}px ${size / 2}px`,
173174
}}
@@ -186,7 +187,8 @@ function AvatarFallback({
186187

187188
{/* Second animated color layer */}
188189
<motion.g
189-
{...(animationConfig?.color2 || {})}
190+
animate={animationConfig?.color2?.animate}
191+
transition={animationConfig?.color2?.transition}
190192
style={{
191193
transformOrigin: `${size / 2}px ${size / 2}px`,
192194
mixBlendMode: "overlay",

0 commit comments

Comments
 (0)