diff --git a/components/marketplace/TransactionStatus.tsx b/components/marketplace/TransactionStatus.tsx index 3e49ee3..ab18d19 100644 --- a/components/marketplace/TransactionStatus.tsx +++ b/components/marketplace/TransactionStatus.tsx @@ -18,12 +18,12 @@ interface TransactionStatusProps { onClose?: () => void; } -export function TransactionStatus({ - steps, - currentStep, - isVisible, +export function TransactionStatus({ + steps, + currentStep, + isVisible, error, - onClose + onClose }: TransactionStatusProps) { const overlayRef = useRef(null); const modalRef = useRef(null); @@ -47,25 +47,25 @@ export function TransactionStatus({ gsap.set(stepsRef.current, { x: -30, opacity: 0 }); // Animate in - tl.to(overlayRef.current, { - opacity: 1, - duration: 0.3, - ease: 'power2.out' + tl.to(overlayRef.current, { + opacity: 1, + duration: 0.3, + ease: 'power2.out' }) - .to(modalRef.current, { - scale: 1, - opacity: 1, - y: 0, - duration: 0.5, - ease: 'back.out(1.7)' - }, '-=0.1') - .to(stepsRef.current, { - x: 0, - opacity: 1, - duration: 0.4, - stagger: 0.1, - ease: 'power2.out' - }, '-=0.2'); + .to(modalRef.current, { + scale: 1, + opacity: 1, + y: 0, + duration: 0.5, + ease: 'back.out(1.7)' + }, '-=0.1') + .to(stepsRef.current, { + x: 0, + opacity: 1, + duration: 0.4, + stagger: 0.1, + ease: 'power2.out' + }, '-=0.2'); // Pulse animation for header icon if (headerIconRef.current) { @@ -112,7 +112,7 @@ export function TransactionStatus({ yoyo: true, ease: 'sine.inOut' }); - + // Shake the icon slightly const icon = stepEl.querySelector('.step-icon'); if (icon) { @@ -130,14 +130,14 @@ export function TransactionStatus({ boxShadow: '0 0 0px rgba(59, 130, 246, 0)', duration: 0.3 }); - + // Pop effect - gsap.fromTo(stepEl, + gsap.fromTo(stepEl, { scale: 1 }, - { - scale: 1.05, - duration: 0.2, - yoyo: true, + { + scale: 1.05, + duration: 0.2, + yoyo: true, repeat: 1, ease: 'power2.out' } @@ -156,7 +156,7 @@ export function TransactionStatus({ // Error shake animation gsap.killTweensOf(stepEl); gsap.to(stepEl, { - x: [-10, 10, -10, 10, 0], + x: [-10, 10, -10, 10, 0] as any, duration: 0.5, ease: 'power2.out' }); @@ -179,10 +179,10 @@ export function TransactionStatus({ duration: 0.3, ease: 'power2.in' }) - .to(overlayRef.current, { - opacity: 0, - duration: 0.2 - }, '-=0.1'); + .to(overlayRef.current, { + opacity: 0, + duration: 0.2 + }, '-=0.1'); }; if (!isVisible) return null; @@ -191,11 +191,11 @@ export function TransactionStatus({ const progressPercent = Math.round((completedCount / steps.length) * 100); return ( -
-
@@ -204,7 +204,7 @@ export function TransactionStatus({
- @@ -228,16 +228,16 @@ export function TransactionStatus({

Transaction Progress

- {steps.some(s => s.status === 'active') - ? 'Processing...' + {steps.some(s => s.status === 'active') + ? 'Processing...' : steps.every(s => s.status === 'completed') - ? 'Complete!' - : error ? 'Failed' : 'Waiting...'} + ? 'Complete!' + : error ? 'Failed' : 'Waiting...'}

{onClose && !steps.some(s => s.status === 'active') && ( -