import Vue from 'vue';
import VueRouter from 'vue-router';

Vue.use(VueRouter);

const routes = [
    {
        path: '/',
        redirect: 'Home',
    },
    {
        path: '/home',
        name: 'home',
        component: () => import('../views/Home.vue'),
    },
    {
        path: '/search',
        name: 'search',
        component: () => import('../views/Search.vue'),
    },
    {
        path: '/chartScreen',
        name: 'chartScreen',
        component: () => import('../views/ChartScreen.vue'),
    },
];

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes,
});

export default router;
