'use client' import { useState } from 'react' import { X, Share2, CheckCircle2 } from 'lucide-react' interface RecoveryCardProps { wallet: string savedCount: number daysInactive?: number campaignName?: string onClose: () => void } export function RecoveryCard({ wallet, savedCount, daysInactive = 8, campaignName = 'Anti-Churn Gift', onClose }: RecoveryCardProps) { const [copied, setCopied] = useState(false) const short = `${wallet.slice(0, 6)}...${wallet.slice(-4)}` const tweetText = encodeURIComponent( `๐Ÿ”ฅ Wallet ${short} returned after ${daysInactive}d of inactivity โ€” rescued by @torqueprotocol FlowState\n\n` + `Campaign: ${campaignName}\n` + `FlowState detected the churn risk, fired the incentive, and brought them back. Autonomous DeFi retention works.\n\n` + `#Solana #DeFi #Torque` ) const tweetUrl = `https://twitter.com/intent/tweet?text=${tweetText}` const handleCopyLink = () => { navigator.clipboard.writeText(`https://github.com/MUTHUKUMARAN-K-1/flowstate`) setCopied(true) setTimeout(() => setCopied(false), 2000) } return (
{/* The shareable card */}
{/* Card header โ€” gradient */}
FS
FlowState ร— Torque
๐Ÿ”ฅ

Wallet Recovered

Churn prevented. User retained.

{/* Card body */}

Wallet

{short}

Back After

{daysInactive}d

Saves

{savedCount}ร—

Triggered by

{campaignName}

via Torque Protocol ยท FlowState AI Engine

Share on X
) }