Update [address].vue

This commit is contained in:
Georges KABBOUCHI 2022-06-09 18:04:36 +03:00
parent 627ab9fe56
commit 84f15e2b2f

View File

@ -152,7 +152,21 @@ const shortenAddress = () => {
return address.value.substr(0, 8) + "..." + address.value.substr(-6); return address.value.substr(0, 8) + "..." + address.value.substr(-6);
}; };
const ens = ref(""); const ens = ref("");
const detectedNetworks = ref(["mainnet", "polygon"]); const detectedNetworks = computed(() => [
...new Set(
taskResults.value.flatMap(({ networkResults }) => {
if (networkResults) {
return Object
.keys(networkResults)
.filter(
(network) => !!networkResults[network].metadata
);
}
return [];
})
),
]);
onMounted(async () => { onMounted(async () => {
if (!address.value) { if (!address.value) {
@ -241,8 +255,8 @@ onMounted(async () => {
</div> </div>
</div> </div>
<div class="mt-3"> <div class="mt-3 w-full px-20" v-if="detectedNetworks.length">
<div class="text-center flex flex-wrap gap-2"> <div class="text-center flex flex-wrap justify-center gap-2">
<div <div
v-for="network in detectedNetworks" v-for="network in detectedNetworks"
class="capitalize bg-blue-100 text-blue-800 px-3 py-1 rounded-full text-sm shadow-sm" class="capitalize bg-blue-100 text-blue-800 px-3 py-1 rounded-full text-sm shadow-sm"