Skip to content
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

[react] Add switchNetworkBtnTitle prop in ConnectWallet and Web3Button #1884

Merged
merged 6 commits into from
Jan 17, 2024

Conversation

tommaay
Copy link
Contributor

@tommaay tommaay commented Nov 1, 2023

Problem solved

Adding a prop named switchNetworkBtnTitle that can be used to set a custom Switch Network text for the ConnectWallet component whenever the condition show the SwitchNetworkButton button is met.

Changes made

  • [ x] Public API changes: list the public API changes made if any
  • Internal API changes: explain the internal logic changes

How to test

  • Create a new Thirdweb app with React or a React framework.

  • Add the ThirdwebProvider at the root level or to a component to test and set any activeChain.

  • Import the ConnectWallet component in any component that's inside the ThirdWeb Provider.

  • Set a value for switchNetworkBtnTitle prop in the ConnectWallet component.

  • Set switchToActiveChain prop to true for the ConnectWallet component.

  • Run the local dev server and once the app is running, connect your wallet using the ConnectButton and switch to a different network from the activeChain set for the ThirdwebProvider.

  • Verify that the ConnectWallet changed the SwitchNetworkButton and has the value of switchNetworkBtnTitle prop as the text.

  • Automated tests: link to unit test file

  • [ x] Manual tests: step by step instructions on how to test

@tommaay tommaay requested a review from a team as a code owner November 1, 2023 02:28
@tommaay tommaay requested a review from a team November 1, 2023 02:28
Copy link

changeset-bot bot commented Nov 1, 2023

🦋 Changeset detected

Latest commit: e61a27e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@thirdweb-dev/react Patch
@thirdweb-dev/react-core Patch
@thirdweb-dev/react-native Patch
@thirdweb-dev/react-native-compat Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@tommaay tommaay changed the title Adding new optional prop to set a custom Switch Network button title [REACT] Adding new optional prop to set a custom Switch Network button title Nov 1, 2023
Copy link

stale bot commented Jan 2, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Won't Fix This will not be worked on. label Jan 2, 2024
@stale stale bot closed this Jan 9, 2024
@MananTank MananTank reopened this Jan 10, 2024
@stale stale bot removed the Won't Fix This will not be worked on. label Jan 17, 2024
@MananTank MananTank changed the title [REACT] Adding new optional prop to set a custom Switch Network button title [react] Add switchNetworkBtnTitle prop in ConnectWallet and Web3Button Jan 17, 2024
@MananTank MananTank enabled auto-merge January 17, 2024 16:24
@MananTank MananTank added this pull request to the merge queue Jan 17, 2024
Merged via the queue into thirdweb-dev:main with commit 89641e3 Jan 17, 2024
This was referenced Jan 17, 2024
jnsdls pushed a commit that referenced this pull request Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants