diff --git a/src/views/Home.vue b/src/views/Home.vue index 7b20e52a..5789968e 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -124,7 +124,7 @@ import { import Ripple from 'vue-ripple-directive' import VuexyLogo from '@core/layouts/components/Logo.vue' import store from '@/store/index' -import { timeIn, toDay } from '@/libs/utils' +import { timeIn, toDay, getLocalChains } from '@/libs/utils' import AppFooter from '@/@core/layouts/components/AppFooter.vue' import FullHeader from './components/FullHeader.vue' @@ -163,6 +163,12 @@ export default { return this.downImg }, }, + beforeCreate() { + const keys = Object.keys(getLocalChains()) + if (keys.length === 1) { + this.$router.push(`/${keys[0]}`) + } + }, methods: { fetch(k) { const chain = this.chains[k]