Skip to content

Commit

Permalink
refactor: move non-index routes to async components
Browse files Browse the repository at this point in the history
  • Loading branch information
annybs committed Jun 14, 2023
1 parent ff9f7d7 commit b6c3192
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
// that can be found in the LICENSE.md file. All rights reserved.

import Index from '../views/Index.vue'
import Nodes from '@/views/Nodes.vue'
import Overview from '@/views/Overview.vue'
import Staking from '@/views/Staking.vue'
import Transactions from '@/views/Transactions.vue'
import { createRouter, createWebHistory } from 'vue-router'

const routes = [
Expand All @@ -18,7 +15,7 @@ const routes = [
{
path: '/nodes',
name: 'Nodes',
component: Nodes
component: () => import('@/views/Nodes.vue')
},
{
path: '/overview',
Expand All @@ -28,18 +25,12 @@ const routes = [
{
path: '/transactions/:page(\\d+)?',
name: 'Transactions',
component: Transactions
},
{
path: '/governance',
name: 'Governance',
component: () => {},
disabled: true
component: () => import('@/views/Transactions.vue')
},
{
path: '/staking',
name: 'Staking',
component: Staking
component: () => import('@/views/Staking.vue')
}
]

Expand Down

0 comments on commit b6c3192

Please sign in to comment.