sample routes + first landing page and routing logic

This commit is contained in:
2021-02-24 21:00:27 +01:00
parent 9958fed045
commit 3e92597a56
8 changed files with 458 additions and 43 deletions

View File

@@ -1,6 +1,21 @@
import { createApp } from 'vue';
import { createWebHashHistory, createRouter } from 'vue-router';
import App from './App.vue';
import 'windi.css';
import 'toastify-js/src/toastify.css';
createApp(App).mount('#app');
// ---------------
const Home = import('./components/Home.vue');
const Register = import('./components/Register.vue');
const Profile = import('./components/Profile.vue');
//
const router = createRouter({
history: createWebHashHistory(),
routes: [
{ path: '/', component: Home },
{ path: '/register', component: Register },
{ path: '/profile', component: Profile }
]
});
// ---------------
createApp(App).use(router).mount('#app');