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

[UI-REACT]: Not possible to render <TonConnectButton /> twice #171

Open
webdeb opened this issue May 28, 2024 · 1 comment · May be fixed by #192
Open

[UI-REACT]: Not possible to render <TonConnectButton /> twice #171

webdeb opened this issue May 28, 2024 · 1 comment · May be fixed by #192
Assignees
Labels
bug Something isn't working

Comments

@webdeb
Copy link

webdeb commented May 28, 2024

Describe the bug

Strange behaviour when the component is rendered twice.
I've one main component which shows the <TonConnectButton> if the user is not connected, and also one inside a modal when the user is about to make a transaction. The second is not rendered.

Expected behavior

The placement of the component should't matter, if its placed it should be rendered.

Current behavior

The fist is show, then I open the modal with the second, the second component is not shown at all, and when I close the modal, the first also disappears!!!

Steps to Reproduce

Place the TonConnectButton uncoditionally and a conditional one, toggle it with some button.

Environment

ui-react

Additional context

No response

@webdeb webdeb added the bug Something isn't working label May 28, 2024
@webdeb
Copy link
Author

webdeb commented May 28, 2024

Why is there an HTML ID?

const buttonRootId = 'ton-connect-button';

@chrisands chrisands linked a pull request Jun 22, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants