Closed itsalimanuel closed 3 months ago
I think they're using an id
in div to determine where the button is placed. You can create another button on your own and then use the hook to open connect modal like this:
const modal = useTonConnectModal();
<button onClick={() => modal.open()}>
Connect Wallet
</button>
@phumaster , Thanks, I already fixed it, but it was my mistake to keep the state open.
Describe the bug
I'm trying to import the
<TonConnectButton/>
component in two places on my website: in the header and at the end of the website. The point is that the component is imported only in the header; in the last section of the website, the component is not visible. When I checked the inspect tool. I saw<div id="ton-connect-button" style="width: fit-content;"></div>
,but it does not exist in the UI at all.Expected behavior
The second component should be visible.
Current behavior
The second component not exist.
Steps to Reproduce
TonConnectButton
component in the first section.TonConnectButton
component in the second section.Environment
Additional context
No response