Skip to content

chore: remove redundant isDisabled prop #1895

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

anusha-c18
Copy link

@anusha-c18 anusha-c18 commented Apr 7, 2025

Summary

The Home component uses the useAccounts() hook to get the isLoading value, which it then passes to HomeActions via the isDisabled prop. In HomeActions, this value is used to conditionally disable the Send and QR code buttons:

  • Send button: isDisabled={isLoading || isDisabled || !hasBalance}
  • QR button: isDisabled={isDisabled}

However, since HomeActions already uses the useAccounts() hook and has direct access to isLoading, the prop is redundant. This PR removes the prop and simplifies the disabled conditions.

Checklist

  • I've added error handling for all actions/requests, and verified how this error will show on UI. (or there was no error handling)
  • I've reviewed all the copy changed/added in this PR, using AI if needed. (or there was no copy changes)
  • I've included the reference to the issues being closed from Github and/or Linear (or there was no issues)
  • I've changed the Docs to reflect my changes (or it was not needed)
  • I've put docs links where it may be helpful (or it was not needed)
  • I checked the resulting UI both in Light and Dark mode (or no UI changes were made)
  • I reviewed the entire PR myself (preferably, on GH UI)

@fuel-cla-bot
Copy link

fuel-cla-bot bot commented Apr 7, 2025

Thanks for the contribution! Before we can merge this, we need @anusha-c18 to sign the Fuel Labs Contributor License Agreement.

@anusha-c18 anusha-c18 marked this pull request as ready for review April 7, 2025 23:42
@anusha-c18 anusha-c18 marked this pull request as draft April 7, 2025 23:49
@anusha-c18 anusha-c18 force-pushed the remove-redundant-prop branch from 51469d0 to e1e3ac0 Compare April 8, 2025 00:04
@anusha-c18 anusha-c18 marked this pull request as ready for review April 8, 2025 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant