From 6a2693b509e55c40585c3bf8f1be0161c8bfd58f Mon Sep 17 00:00:00 2001 From: DukeDeSouth Date: Mon, 9 Feb 2026 09:21:39 -0500 Subject: [PATCH] fix: show loading spinner instead of clickable claim button during data fetch When switching networks, `claimed` state resets to `undefined` while new claim data loads from the smart contract. The existing ternary treated `undefined` as falsy, rendering an active ClaimButton that does nothing. Added explicit `claimed === undefined` check to display a loading Spinner (matching existing codebase pattern) until claim data is available. Fixes #614 Co-authored-by: Cursor --- src/pages/gd/Claim/OldClaim.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pages/gd/Claim/OldClaim.tsx b/src/pages/gd/Claim/OldClaim.tsx index ff5301046..d92a32897 100644 --- a/src/pages/gd/Claim/OldClaim.tsx +++ b/src/pages/gd/Claim/OldClaim.tsx @@ -11,7 +11,7 @@ import { useScreenSize, ClaimSuccessModal, } from '@gooddollar/good-design' -import { Box, Center, Text, useBreakpointValue } from 'native-base' +import { Box, Center, Spinner, Text, useBreakpointValue } from 'native-base' import { useConnectionInfo } from 'hooks/useConnectionInfo' import { useClaim, @@ -337,7 +337,11 @@ Learn how here`,
- {claimed ? ( + {claimed === undefined ? ( + + + + ) : claimed ? (