Update [address].vue

This commit is contained in:
Georges KABBOUCHI 2022-06-09 19:02:39 +03:00
parent 09087a50e8
commit 42d09ee086

View File

@ -151,6 +151,7 @@ const tasks: Array<Task> = [
]; ];
const taskResults = ref([]); const taskResults = ref([]);
const error = ref("");
const route = useRoute(); const route = useRoute();
const addressParam = String(route.params.address); const addressParam = String(route.params.address);
@ -184,7 +185,7 @@ onMounted(async () => {
} }
if (!address.value) { if (!address.value) {
// do something error.value = "Invalid address or ENS name";
return; return;
} }
@ -250,7 +251,11 @@ onMounted(async () => {
<template> <template>
<div class="sm:mx-auto sm:w-full sm:max-w-xl"> <div class="sm:mx-auto sm:w-full sm:max-w-xl">
<div class="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10"> <div class="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10">
<div v-if="address" class="flex flex-col items-center"> <div v-if="error" class="flex items-center justify-center py-10">
<span class="font-semibold text-lg">{{ error }}</span>
</div>
<div v-else-if="address" class="flex flex-col items-center">
<QrcodeVue <QrcodeVue
:size="196" :size="196"
:value="address" :value="address"