diff options
Diffstat (limited to 'client/src/router')
-rw-r--r-- | client/src/router/index.js | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/client/src/router/index.js b/client/src/router/index.js index 22d739e..eee610c 100644 --- a/client/src/router/index.js +++ b/client/src/router/index.js @@ -1,6 +1,9 @@ import {createRouter, createWebHistory} from 'vue-router'; -import Home from '../views/Home.vue'; -import ExamplePage from '../views/ExamplePage.vue'; +import Home from '@/views/Home.vue'; +import Product from '@/views/Product.vue'; +import Checkout from '@/views/Checkout.vue'; +import Login from '@/views/Login.vue'; +import Register from '@/views/Register.vue'; const routes = [ { @@ -9,15 +12,30 @@ const routes = [ component: Home }, { - path: '/example', - name: 'Example', - component: ExamplePage + path: '/product/:id', + name: 'Product', + component: Product + }, + { + path: '/checkout', + name: 'Checkout', + component: Checkout + }, + { + path: '/login', + name: 'Login', + component: Login + }, + { + path: '/register', + name: 'Register', + component: Register } -] +]; const router = createRouter({ history: createWebHistory(process.env.BASE_URL), routes -}) +}); -export default router +export default router; |