feat(market): add 24h crypto sparkline chart with CoinGecko history and resilient fallback
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
} from "lucide-react";
|
||||
|
||||
import { CurrencyIcon } from "@/components/converter/currency-icon";
|
||||
import { PriceSparkline } from "@/components/converter/price-sparkline";
|
||||
import { CurrencySelect } from "@/components/converter/currency-select";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { Button } from "@/components/ui/button";
|
||||
@@ -550,6 +551,12 @@ export function ConverterCard({
|
||||
</p>
|
||||
) : null}
|
||||
|
||||
<PriceSparkline
|
||||
points={marketData?.priceHistory24h ?? []}
|
||||
isLoading={isMarketLoading && !marketData}
|
||||
className="mt-3"
|
||||
/>
|
||||
|
||||
<div className="mt-3 grid gap-2 sm:grid-cols-2 lg:grid-cols-4">
|
||||
<div className="rounded-lg border border-border/60 bg-background/60 p-3">
|
||||
<p className="text-xs uppercase tracking-[0.1em] text-muted-foreground">
|
||||
|
||||
Reference in New Issue
Block a user