wallet-connect-web-examples/advanced/dapps/vue-dapp-auth/pages/index.vue
Glitch deb123f283
restructure (#345)
* restructure

* udpate readme links
2023-12-13 15:36:25 -03:00

21 lines
562 B
Vue

<template>
<div class="tw-h-full tw-flex tw-items-center tw-justify-center">
<client-only>
<account-card v-if="address" :address="address" />
<qr-view v-else-if="connectUri" :uri="connectUri" />
<connect-view v-else />
</client-only>
</div>
</template>
<script setup lang="ts">
import { storeToRefs } from 'pinia'
import { useConnectionStore } from '../stores'
const connectionStore = useConnectionStore()
const { connectUri, address } = storeToRefs(connectionStore)
// Init auth client
onMounted(connectionStore.init)
</script>