Skip to content

Commit bc4e94f

Browse files
committed
chore: reuse buttonText
1 parent eec4f4f commit bc4e94f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/features/swap/components/SubmitButton.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,9 @@ export function SubmitButton({ isWalletConnected, isBalanceLoaded }: ISubmitButt
8484
if (!isOnCelo) return Button3DText.switchToCeloNetwork
8585
if (isWalletConnected && !isBalanceLoaded) return Button3DText.balanceStillLoading
8686
if (hasError) return errorText
87+
if (isSubmitting) return 'Loading...'
8788
return Button3DText.continue
88-
}, [errorText, hasError, isWalletConnected, isOnCelo, isBalanceLoaded])
89+
}, [errorText, hasError, isWalletConnected, isOnCelo, isBalanceLoaded, isSubmitting])
8990

9091
const onClick = useMemo(() => {
9192
if (!isWalletConnected) return openConnectModal
@@ -111,7 +112,7 @@ export function SubmitButton({ isWalletConnected, isBalanceLoaded }: ISubmitButt
111112
isWalletConnected={isWalletConnected}
112113
isBalanceLoaded={isBalanceLoaded}
113114
>
114-
{isSubmitting ? 'Loading...' : buttonText}
115+
{buttonText}
115116
</Button3D>
116117
</div>
117118
)

0 commit comments

Comments
 (0)