From e956e1cddb677b18f1fd7c2153ef075e7dcc5b95 Mon Sep 17 00:00:00 2001 From: Gilgard <Hjelljord.alida@gmail.com> Date: Fri, 22 Apr 2022 11:25:50 +0200 Subject: [PATCH] Profile view for current user --- src/router/index.js | 15 +++++++-------- src/views/ProfileView.vue | 16 ++-------------- 2 files changed, 9 insertions(+), 22 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index 3e9afc8..09ae8cd 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 09d3228..020125b 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> -- GitLab