From 5e36425f008903607fec5c7feaca31f787092d44 Mon Sep 17 00:00:00 2001 From: liangping <18786721@qq.com> Date: Sun, 3 Dec 2023 09:46:22 +0800 Subject: [PATCH] sort featured blockchain --- src/pages/index.vue | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/pages/index.vue b/src/pages/index.vue index 873e9ee3..0eff064f 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -24,7 +24,9 @@ const chains = computed(() => { const featured = computed(() => { const names = ["cosmos", "osmosis", "akash", "celestia", "evmos", "injective"]; - return chains.value.filter(x => names.includes(x.chainName)) + return chains.value + .filter(x => names.includes(x.chainName)) + .sort((a, b)=> (names.indexOf(a.chainName) - names.indexOf(b.chainName))) }) const chainStore = useBlockchain() @@ -56,15 +58,11 @@ const chainStore = useBlockchain()
{{ $t('pages.slogan') }}
-