aboutsummaryrefslogtreecommitdiff
path: root/client/src/router
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2021-07-24 18:58:17 +0200
committerMateja <mail@matejamaric.com>2021-07-24 18:58:17 +0200
commitd30fd3054c66d707a8210872b7db6cf4a1a98793 (patch)
tree6667713fc67fcaaa4e4dae291d95828fc5e802ad /client/src/router
parent080ca69a42ae8c510560bd176484adafd2c29a0c (diff)
downloadmevn-ecommerce-d30fd3054c66d707a8210872b7db6cf4a1a98793.tar.gz
mevn-ecommerce-d30fd3054c66d707a8210872b7db6cf4a1a98793.zip
Added boilerplate pages and `ProductCard` component.
Diffstat (limited to 'client/src/router')
-rw-r--r--client/src/router/index.js34
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;