Skip to content

Commit

Permalink
fix: loading button
Browse files Browse the repository at this point in the history
  • Loading branch information
NeOMakinG committed Sep 12, 2024
1 parent c4c979f commit da8af4e
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ export const ConfirmSummary = ({
translate,
])

const buttonText = useMemo(() => {
return <Text translation={quoteStatusTranslation} />
}, [quoteStatusTranslation])

return (
<>
<CardFooter
Expand Down Expand Up @@ -303,14 +307,16 @@ export const ConfirmSummary = ({
/>

<Button
isLoading={isAccountMetadataLoading}
loadingText={buttonText}
type='submit'
colorScheme={quoteHasError ? 'red' : 'blue'}
size='lg-multiline'
data-test='trade-form-preview-button'
isDisabled={shouldDisablePreviewButton}
mx={-2}
>
<Text translation={quoteStatusTranslation} />
{buttonText}
</Button>
</CardFooter>
</>
Expand Down

0 comments on commit da8af4e

Please sign in to comment.