From acabc9fcca9d12983c4fae3299048ace96b9f796 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 22 Jan 2026 07:53:15 +0000 Subject: [PATCH] fix: improve Support tab UI and zap amount pre-selection UI improvements: - Move Contribute section before Monthly Goal section - Increase font size for contribution amounts (text-sm -> text-base) - Make contribution tier icons muted (text-muted-foreground) - Increase gap between icon and amount (gap-1 -> gap-1.5) Bug fix: - Add useEffect to update selectedAmount when defaultAmount prop changes - Fixes issue where zap amount wasn't being pre-selected from buttons --- src/components/SettingsViewer.tsx | 42 +++++++++++++++---------------- src/components/ZapWindow.tsx | 7 ++++++ 2 files changed, 28 insertions(+), 21 deletions(-) diff --git a/src/components/SettingsViewer.tsx b/src/components/SettingsViewer.tsx index 9c95f10..0277c1d 100644 --- a/src/components/SettingsViewer.tsx +++ b/src/components/SettingsViewer.tsx @@ -216,6 +216,27 @@ export function SettingsViewer() {

+ {/* Contribution Tiers */} +
+

Contribute

+
+ {contributionTiers.map(({ amount, icon: Icon }) => ( + + ))} +
+
+ {/* Show Monthly Goal Toggle */}
@@ -262,27 +283,6 @@ export function SettingsViewer() {
- {/* Contribution Tiers */} -
-

Contribute

-
- {contributionTiers.map(({ amount, icon: Icon }) => ( - - ))} -
-
- {/* Top Contributors This Month */} {topDonors && topDonors.length > 0 && (
diff --git a/src/components/ZapWindow.tsx b/src/components/ZapWindow.tsx index d803f26..dde64ef 100644 --- a/src/components/ZapWindow.tsx +++ b/src/components/ZapWindow.tsx @@ -150,6 +150,13 @@ export function ZapWindow({ const [paymentTimedOut, setPaymentTimedOut] = useState(false); const [zapAnonymously, setZapAnonymously] = useState(false); + // Update selected amount when defaultAmount prop changes + useEffect(() => { + if (defaultAmount) { + setSelectedAmount(defaultAmount); + } + }, [defaultAmount]); + // Editor ref and search functions const editorRef = useRef(null); const { searchProfiles } = useProfileSearch();