From a76cd67581a2db5b33e3cea28aeb5f637147b34b Mon Sep 17 00:00:00 2001 From: zvspany Date: Sun, 8 Mar 2026 12:31:00 +0100 Subject: [PATCH] improve landing UI and open-source branding --- components/converter/converter-card.tsx | 57 +++++++++++++++++------- components/sections/hero.tsx | 32 ++++++++----- components/sections/insights-section.tsx | 39 ++++++++++------ 3 files changed, 90 insertions(+), 38 deletions(-) diff --git a/components/converter/converter-card.tsx b/components/converter/converter-card.tsx index 080d274..e4ddc7e 100644 --- a/components/converter/converter-card.tsx +++ b/components/converter/converter-card.tsx @@ -12,7 +12,7 @@ import { CardContent, CardDescription, CardHeader, - CardTitle + CardTitle, } from "@/components/ui/card"; import { Input } from "@/components/ui/input"; import { Separator } from "@/components/ui/separator"; @@ -23,7 +23,7 @@ import { formatAmount, formatInverseRate, formatRate, - formatTimestamp + formatTimestamp, } from "@/lib/format"; import { buildRateMap, convertAmount } from "@/lib/rates"; import { validateAmount } from "@/lib/validation"; @@ -62,7 +62,7 @@ function ConverterSkeleton() { function ErrorState({ message, - onRetry + onRetry, }: { message: string; onRetry: () => void; @@ -73,11 +73,17 @@ function ErrorState({
-

Unable to load market rates

+

+ Unable to load market rates +

{message}

- @@ -101,7 +107,7 @@ function EmptyState() { export function ConverterCard({ forcedFromCode, forcedToCode, - onPairChange + onPairChange, }: ConverterCardProps) { const { data, error, isLoading, refresh } = useMarketRates(); @@ -126,7 +132,8 @@ export function ConverterCard({ if (!rateMap.has(toCode)) { const fallback = rateMap.has(DEFAULT_TO) ? DEFAULT_TO - : assets.find((asset) => asset.code !== fromCode)?.code ?? assets[0].code; + : (assets.find((asset) => asset.code !== fromCode)?.code ?? + assets[0].code); setToCode(fallback); } @@ -209,26 +216,35 @@ export function ConverterCard({
- Smart Converter + Currency Converter
- + Fiat: {data.sources.fiat} - + Crypto: {data.sources.crypto}
- Convert fiat and crypto assets instantly using live normalized USD quote data. + Convert fiat currencies and cryptocurrencies using live exchange + rates.
{error ? (
- Using last successful data. Latest refresh failed: {error} + + Using last successful data. Latest refresh failed: {error} +
) : null} @@ -289,12 +305,20 @@ export function ConverterCard({ {fromAsset && toAsset ? (
- + {fromAsset.code} to - + {toAsset.code}
@@ -304,7 +328,10 @@ export function ConverterCard({

{fromAsset ? (

- for {inputValidation.ok ? formatAmount(inputValidation.value, fromAsset) : "-"}{" "} + for{" "} + {inputValidation.ok + ? formatAmount(inputValidation.value, fromAsset) + : "-"}{" "} {fromAsset.code}

) : null} diff --git a/components/sections/hero.tsx b/components/sections/hero.tsx index 661f538..bb1c749 100644 --- a/components/sections/hero.tsx +++ b/components/sections/hero.tsx @@ -1,21 +1,33 @@ -import { Badge } from "@/components/ui/badge"; +import { Github } from "lucide-react"; export function Hero() { return (
- - Real-time fiat and crypto conversion - +
+
+ Open Source + + MIT License + + + + +
+

- Convert Global Currencies and Crypto in One Premium Workspace + Open-source fiat and crypto converter

- Instantly switch between fiat and digital assets with live rates, smart - formatting, and a clean professional interface built for speed. + Convert fiat currencies and cryptocurrencies using live exchange + rates.

diff --git a/components/sections/insights-section.tsx b/components/sections/insights-section.tsx index 930ba13..c2edbb1 100644 --- a/components/sections/insights-section.tsx +++ b/components/sections/insights-section.tsx @@ -1,6 +1,12 @@ "use client"; -import { ArrowRightLeft, Landmark, Layers, MoveRight, Workflow } from "lucide-react"; +import { + ArrowRightLeft, + Landmark, + Layers, + MoveRight, + Workflow, +} from "lucide-react"; import { CurrencyIcon } from "@/components/converter/currency-icon"; import { Button } from "@/components/ui/button"; @@ -23,31 +29,31 @@ const popularPairs: PopularPair[] = [ { from: "ETH", to: "SOL", fromType: "crypto", toType: "crypto" }, { from: "XMR", to: "BTC", fromType: "crypto", toType: "crypto" }, { from: "LTC", to: "BTC", fromType: "crypto", toType: "crypto" }, - { from: "CHF", to: "JPY", fromType: "fiat", toType: "fiat" } + { from: "CHF", to: "JPY", fromType: "fiat", toType: "fiat" }, ]; const howItWorks = [ "Fiat rates are fetched from Frankfurter with USD as the common quote.", "Crypto prices are fetched from CoinGecko in USD.", - "Any pair is converted through normalized USD-per-unit pricing." + "Any pair is converted through normalized USD-per-unit pricing.", ]; const supportedAssets = [ { title: "Fiat currencies", description: - "Supports a broad list of global government-issued currencies, including major and regional pairs." + "Supports a broad list of global government-issued currencies, including major and regional pairs.", }, { title: "Cryptocurrencies", description: - "Includes leading crypto assets such as BTC, ETH, LTC, XMR, SOL, USDT, and more." + "Includes leading crypto assets such as BTC, ETH, LTC, XMR, SOL, USDT, and more.", }, { title: "Cross-market pairs", description: - "Convert fiat-to-crypto, crypto-to-fiat, and crypto-to-crypto in one unified experience." - } + "Convert fiat-to-crypto, crypto-to-fiat, and crypto-to-crypto in one unified experience.", + }, ]; interface InsightsSectionProps { @@ -59,7 +65,7 @@ interface InsightsSectionProps { export function InsightsSection({ selectedFromCode, selectedToCode, - onSelectPopularPair + onSelectPopularPair, }: InsightsSectionProps) { return (
@@ -67,7 +73,7 @@ export function InsightsSection({ - Popular conversions + Common pairs @@ -86,11 +92,15 @@ export function InsightsSection({ "h-9 rounded-full border-border/70 bg-background/50 px-3.5 font-normal transition-all", "hover:border-cyan-400/40 hover:bg-cyan-400/10 hover:text-cyan-100", isActive && - "border-cyan-400/50 bg-cyan-400/15 text-cyan-100 shadow-[0_0_0_1px_hsl(189_100%_40%_/_0.2)]" + "border-cyan-400/50 bg-cyan-400/15 text-cyan-100 shadow-[0_0_0_1px_hsl(189_100%_40%_/_0.2)]", )} > - + {pair.from} @@ -111,7 +121,10 @@ export function InsightsSection({ {howItWorks.map((line) => ( -

+

{line}

))} @@ -122,7 +135,7 @@ export function InsightsSection({ - Supported asset types + Supported currencies