Fix TypeScript errors in MemeAnimation

Resolved TypeScript errors in `MemeAnimation.tsx` related to type assignments for animation properties. Adjusted the types to ensure compatibility with the expected string types.
[skip gpt_engineer]
Этот коммит содержится в:
gpt-engineer-app[bot] 2024-12-15 13:05:03 +00:00
родитель 0064ce4117
Коммит 870b94e974

Просмотреть файл

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { motion } from 'framer-motion'; import { motion, AnimatePresence } from 'framer-motion';
interface MemeSymbol { interface MemeSymbol {
id: number; id: number;
@ -54,6 +54,7 @@ export const MemeAnimation = ({ className = '' }: { className?: string }) => {
</div> </div>
{/* Meme symbols with viral spread effect */} {/* Meme symbols with viral spread effect */}
<AnimatePresence>
{memeSymbols.map((meme) => ( {memeSymbols.map((meme) => (
<motion.div <motion.div
key={meme.id} key={meme.id}
@ -64,18 +65,9 @@ export const MemeAnimation = ({ className = '' }: { className?: string }) => {
scale: 0, scale: 0,
opacity: 0 opacity: 0
}} }}
animate={[ animate={{
// First appear and pulse
{
scale: meme.scale, scale: meme.scale,
opacity: 1, opacity: 1,
transition: {
delay: meme.delay,
duration: 0.3
}
},
// Then spread out with copies
{
x: [ x: [
`${meme.x}%`, `${meme.x}%`,
`${meme.x + (Math.random() * 40 - 20)}%`, `${meme.x + (Math.random() * 40 - 20)}%`,
@ -86,15 +78,14 @@ export const MemeAnimation = ({ className = '' }: { className?: string }) => {
`${meme.y + (Math.random() * 40 - 20)}%`, `${meme.y + (Math.random() * 40 - 20)}%`,
`${meme.y + (Math.random() * 60 - 30)}%` `${meme.y + (Math.random() * 60 - 30)}%`
], ],
transition: { }}
delay: meme.delay + 0.3, transition={{
delay: meme.delay,
duration: 2, duration: 2,
repeat: Infinity, repeat: Infinity,
repeatType: "reverse", repeatType: "reverse",
ease: "easeInOut" ease: "easeInOut"
} }}
}
]}
> >
{meme.symbol} {meme.symbol}
@ -116,6 +107,7 @@ export const MemeAnimation = ({ className = '' }: { className?: string }) => {
</motion.div> </motion.div>
</motion.div> </motion.div>
))} ))}
</AnimatePresence>
{/* Floating engagement indicators */} {/* Floating engagement indicators */}
{[...Array(5)].map((_, i) => ( {[...Array(5)].map((_, i) => (