Skip to content
Snippets Groups Projects
Select Git revision
  • 8c662ffefd32dce4fe0a006a233b821b849f4f3d
  • main
  • linux2
  • linux
  • newboxes
  • offlineupdates
  • qol
  • cryptotest2
  • css-cards
  • crypto-test
  • draganddrop
  • height3
  • height
  • zindex
  • connection2
  • v-forupdate
  • connections
  • v-for
  • organise-forlarger
  • kebabcase
  • lowercase
21 results

index.js

Blame
  • index.js 1.72 KiB
    import Vue from 'vue'
    import VueRouter from 'vue-router'
    import Home from '../views/Home.vue'
    import Cards from '../views/Cards.vue'
    import List from '../views/List.vue'
    import Discarded from '../views/Discarded.vue'
    import Leave from '../views/Leave.vue'
    // import Oldhome from '../views/Oldhome'
    //import Test from '../views/Test'
    
    Vue.use(VueRouter)
    
    export const routes = [
      {
        path: '/',
        name: 'Home',
        component: Home,
      },
      {
        path: '/cards',
        name: 'Cards',
        component: Cards,
      },
      {
        path: '/list',
        name: 'My List',
        component: List,
      },
      {
        path: '/discarded',
        name: 'Discarded',
        component: Discarded,
      },
      {
        path: '/about',
        name: 'About',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () =>
          import(/* webpackChunkName: "about" */ '../views/About.vue'),
      },
    
      {
        path: '/leave',
        name: 'Leave',
        component: Leave,
      },
    
      // {
      //   path: '/test',
      //   name: 'IPFS Test',
      //   component: Test,
      // },
      // {
      //   path: '/oldhome',
      //   name: 'Old Home',
      //   component: Oldhome,
      // },
    
      // dynamic segement `:microcosm` is added to the path
      {
        path: '/microcosm/:microcosm',
        component: Home,
      },
    
      {
        // catches 404 errors
        path: '*',
        name: '404',
        component: () =>
          import(
            /* webpackChunkName: "NotFoundComponent" */ '../views/NotFound.vue'
          ),
      },
    ]
    
    const router = new VueRouter({
      mode: 'history',
      //base: 'https://alpha.nodenogg.in/',
      //base: process.env.VUE_APP_HTTP + '://' + process.env.VUE_APP_URL + '',
      //base: process.env.VUE_APP_HTTP,
      routes,
    })
    
    export default router