diff --git a/src/router/index.js b/src/router/index.js index 3e9afc866ddd3b838a5720151bca3d7cd89f819a..09ae8cd1aa3455903a67fbf55097a3b4c68c71de 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -2,7 +2,6 @@ import { createRouter, createWebHistory } from "vue-router"; import HomeView from "../views/HomeView.vue"; import LoginView from "../views/LoginView.vue"; - const routes = [ { path: "/endre", //Endre før push @@ -12,11 +11,12 @@ const routes = [ { 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/AboutView.vue"), + component: () => import("../views/AboutView.vue"), + }, + { + path: "/profile", + name: "profile", + component: () => import("../views/ProfileView.vue"), }, { path: "/register", @@ -31,8 +31,7 @@ const routes = [ path: "/", name: "login", component: LoginView, - } - + }, ]; const router = createRouter({ diff --git a/src/views/ProfileView.vue b/src/views/ProfileView.vue index 09d32285494a15c8c09cce00b651fb71ef5c4e17..020125b4fef4a91b88f808a039626660419a6c09 100644 --- a/src/views/ProfileView.vue +++ b/src/views/ProfileView.vue @@ -4,27 +4,15 @@ <v-row align="center" class="pa-2"> <large-profile-card :isCurrentUser="true" :userID="2" /> </v-row> - <v-row align="center" class="pa-2"> - <large-profile-card :userID="1" :isCurrentUser="false" /> - </v-row> - <v-row align="center" class="pa-2"> - <user-list-item :userID="1" :ratingType="'Leietaker'" /> - </v-row> </v-container> </template> <script> -import { defineComponent } from "vue"; - -// Components import LargeProfileCard from "@/components/UserProfileComponents/LargeProfileCard.vue"; -import UserListItem from "@/components/UserProfileComponents/UserListItemCard.vue"; -export default defineComponent({ - name: "ProfileView", +export default { components: { LargeProfileCard, - UserListItem, }, -}); +}; </script>