diff --git a/src/components/MilestoneCelebration.tsx b/src/components/MilestoneCelebration.tsx deleted file mode 100644 index bcbaa1c2..00000000 --- a/src/components/MilestoneCelebration.tsx +++ /dev/null @@ -1,77 +0,0 @@ -import React, { useEffect, useState } from 'react'; -import confetti from 'canvas-confetti'; -import { motion, AnimatePresence } from 'framer-motion'; - -interface CelebrationProps { - isOpen: boolean; - onClose: () => void; - rewardAmount: number; - newBalance: number; - lessonName: string; - isFinalMilestone?: boolean; -} - -const MilestoneCelebration: React.FC = ({ - isOpen, onClose, rewardAmount, newBalance, lessonName, isFinalMilestone -}) => { - const [count, setCount] = useState(newBalance - rewardAmount); - - useEffect(() => { - if (isOpen) { - // 1. Fire Confetti - confetti({ - particleCount: 150, - spread: 70, - origin: { y: 0.6 }, - disableForReducedMotion: true // Accessibility requirement - }); - - // 2. Animate Balance Count-up - const timer = setTimeout(() => { - setCount(newBalance); - }, 500); - return () => clearTimeout(timer); - } - }, [isOpen, newBalance]); - - const twitterShareUrl = `https://twitter.com/intent/tweet?text=${encodeURIComponent( - `Just earned ${rewardAmount} LRN completing ${lessonName} on @LearnVaultDAO! 🎓` - )}`; - - return ( - - {isOpen && ( -
- -

- {isFinalMilestone ? "🏆 Track Complete!" : "🎉 Milestone Complete!"} -

-

You earned +{rewardAmount} LRN

- -
-

Total Reputation

-

{count} LRN

-
- -
- - Share on Twitter - - -
-
-
- )} -
- ); -}; - -export default MilestoneCelebration; \ No newline at end of file