"use client"; import { useUser } from "@/lib/context"; import { User, Flame, Coins, CheckCircle, Smartphone, ArrowRight, Share2, Compass, ChevronRight, Activity, TrendingUp } from "lucide-react"; export default function DashboardPreview() { const { profile } = useUser(); // Dynamic calculations based on user's steps const caloriesBurned = Math.round(profile.stepsToday * 0.04); const distanceKm = (profile.stepsToday * 0.00076).toFixed(2); const activeMinutes = Math.round(profile.stepsToday * 0.008); const stepPercentage = Math.min(100, Math.round((profile.stepsToday / profile.stepGoal) * 100)); // Weekly steps dummy data const weeklySteps = [ { day: "Mon", steps: 8200 }, { day: "Tue", steps: 9400 }, { day: "Wed", steps: 6100 }, { day: "Thu", steps: 7800 }, { day: "Fri", steps: 11200 }, { day: "Sat", steps: 9000 }, { day: "Sun", steps: profile.stepsToday }, ]; const maxWeeklySteps = Math.max(...weeklySteps.map((d) => d.steps)); // Transaction history dummy data const transactions = [ { id: 1, type: "Walk Reward", detail: "6,420 steps synced", amount: "+16 LYT", time: "2 hours ago", isEarn: true }, { id: 2, type: "Redeemed Brand", detail: "Starbucks $10 Voucher", amount: "-150 LYT", time: "5 hours ago", isEarn: false }, { id: 3, type: "Referral Bonus", detail: "Invited Marcus Lee", amount: "+50 LYT", time: "1 day ago", isEarn: true }, { id: 4, type: "Game Catch", detail: "LYT Catcher Score: 45", amount: "+45 LYT", time: "1 day ago", isEarn: true }, ]; return (
{/* Background visual glows */}
{/* Section Header */}
Platform Preview

Manage Assets on Your Dashboard

Track walking logs, check voucher redemption codes, and review points transaction history in your unified portal.

{/* Contents Grid */}
{/* Left Block: Weekly Progress Charts (col-span-3) */}
Activity Logs Weekly
{/* Steps Chart */}
{weeklySteps.map((d, idx) => { const pct = Math.max(15, Math.round((d.steps / maxWeeklySteps) * 100)); const isToday = idx === weeklySteps.length - 1; return (
{/* Tooltip */}
{d.steps.toLocaleString()}
{d.day}
); })}
🎉 Your weekly walk step frequency has increased by 12.4% since last week. Keep it up!
{/* Center Block: Mobile iOS Phone Mockup (col-span-5) */}
{/* Phone Shell */}
{/* Dynamic Island Notch */}
{/* Status Header */}
9:41
5G 100%
{/* App Internal Body (Scrollable mock container) */}
{/* User Header */}
AS
{profile.name} Level {profile.level} Premium Member
{/* Streak tag */}
{profile.streak} Days
{/* Circular Step Tracker */}
{/* Gauge */}
{/* SVG circular track */} {/* Step values */}
{profile.stepsToday.toLocaleString()} Steps Today
Goal: {profile.stepGoal.toLocaleString()} steps ({stepPercentage}%) {/* Stats split */}
{caloriesBurned} Kcal
{distanceKm} Km
{activeMinutes} Mins
{/* Balance & Send Row */}
Wallet Balance {profile.lytBalance} LYTs
{/* Challenges Panel */}

Daily Missions

Log 5,000 steps today
+10 LYT
Check in at Brew & Co
+5 LYT
{/* Bottom Nav Bar */}
Track
Explore
Wallet
{/* Right Block: Transaction Log Feed (col-span-4) */}
Wallet Transaction Ledger Real-Time
{/* Transaction list */}
{transactions.map((tx) => (
{tx.type} {tx.detail}
{tx.amount} {tx.time}
))}
); }