wallet-connect-web-examples/dapps/vue-dapp-auth/pages/index.vue
Pavel Yankovski 7e850d66c4
feat(vue-dapp-auth): Add example dapp on Vue 3 (#76)
Co-authored-by: Ben Kremer <contact@bkrem.dev>
2022-11-14 18:13:55 +01: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>