Skip to content

[UI] question in nuxt 3 #218

Open
Open
@mahdi4187

Description

@mahdi4187

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.

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions