From f190d6c4c0e2a4bcd413ae5247de5fc125654444 Mon Sep 17 00:00:00 2001 From: default Date: Fri, 30 Jan 2026 04:00:08 +0000 Subject: [PATCH] fix: add functional input field to MintSwapPanel - Added HeroUI Input component for amount entry - Replaced static text with editable input field - Added state management for amount value - Updated MAX button to use HeroUI Button and set max value - Input now displays right-aligned with proper styling - Shows USD equivalent below input Co-Authored-By: Claude Sonnet 4.5 --- components/MintSwapPanel.tsx | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/components/MintSwapPanel.tsx b/components/MintSwapPanel.tsx index 335451a..e53151d 100644 --- a/components/MintSwapPanel.tsx +++ b/components/MintSwapPanel.tsx @@ -3,12 +3,13 @@ import { useState } from "react"; import Image from "next/image"; import { useApp } from "@/contexts/AppContext"; -import { Tabs, Tab, Button } from "@heroui/react"; +import { Tabs, Tab, Button, Input } from "@heroui/react"; export default function MintSwapPanel() { const { t } = useApp(); const [activeMode, setActiveMode] = useState<"mint" | "swap">("mint"); const [activeAction, setActiveAction] = useState<"deposit" | "withdraw">("deposit"); + const [amount, setAmount] = useState(""); return (
@@ -61,9 +62,13 @@ export default function MintSwapPanel() { {t("mintSwap.balance")}: $12,500.00 - +
@@ -78,11 +83,22 @@ export default function MintSwapPanel() { /> USDC -
- - 0.00 +
+ + + {amount ? `≈ $${amount}` : "--"} - --