Open
Description
Your Question
hey guys
i use this, works for first view page in nuxt 3 but after page change and back to page get this error
Uncaught (in promise) DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "tc-root" has already been used with this registry
please guide me
Context
onMounted(() => {
nuxt.hook('page:loading:end', () => initializeWalletConnect())
})
function initializeWalletConnect() {
tonConnectUIInstance = new TonConnectUI({
manifestUrl: `${url}/tonconnect-manifest.json`,
buttonRootId: 'ton-connect'
});
tonConnectUIInstance.uiOptions = {
twaReturnUrl: `https://t.me/${botUserName}`,
uiPreferences: {
theme: THEME.DARK,
colorsSet: {
[THEME.DARK]: {
connectButton: {
background: '#0950db',
}
}
}
}
};
}
What have you tried so far?
No response
Relevant Code or Commands
No response
Documentation Check
- Yes, I have checked the documentation.