"use client"; import { cn } from "@/lib/utils"; import { TrendingUp, TrendingDown } from "lucide-react"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import type { TokenPrice } from "@/lib/mock/cryptoMockData"; import { formatPrice, formatPercent, formatLargeNumber } from "@/lib/mock/cryptoMockData"; interface MarketOverviewProps { tokens: TokenPrice[]; className?: string; } function MarketCard({ token }: { token: TokenPrice }) { const isPositive = token.priceChange24h > 0; const isNegative = token.priceChange24h < 0; return (
{token.icon || token.symbol.charAt(0)}
{token.symbol}
{token.name}
{formatPrice(token.price)}
{isPositive && } {isNegative && } {formatPercent(token.priceChange24h)}
); } export function MarketOverview({ tokens, className }: MarketOverviewProps) { return ( 📊 Market Overview {tokens.map((token) => ( ))} ); }