diff --git a/src/components/CommunityComponents/CommunityHome.vue b/src/components/CommunityComponents/CommunityHome.vue index 63ccc0be85db9364b8f79ca0d1ab2fd19769fb87..6df854a7821d5e8b45601d67731d08ff7cb9ae00 100644 --- a/src/components/CommunityComponents/CommunityHome.vue +++ b/src/components/CommunityComponents/CommunityHome.vue @@ -1,6 +1,16 @@ <template> <section class="w-full px-5 py-4 mx-auto rounded-md"> + <div> + <img + class="cursor-pointer h-8 float-right" + v-if="isLoggedIn" + src="@/assets/members.png" + alt="Medlemmer" + @click="$router.push('/group/:id/memberlist')" + /> + </div> + <CommunityHeader :admin-status="false" :community="community" class="mb-5"/> <!-- Search field --> @@ -64,6 +74,7 @@ export default { data() { return { + isLoggedIn: false, items: [], item: { img: "", @@ -87,6 +98,7 @@ export default { }, }, beforeMount() { + if (this.$store.state.user.token !== null){this.isLoggedIn = true} this.getCommunityFromAPI(); //To get the id of the community before mounting the view this.getListingsOfCommunityFromAPI(); } diff --git a/src/router/index.js b/src/router/index.js index 06e3c5d82e1782c8aef9db1130a5f96f69d123ed..40ad6e4bfac409d83102dff4d1766980137e94b0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -96,7 +96,6 @@ const routes = [ path: "/community/:communityID", name: "GroupHome", component: () => import("../views/CommunityViews/CommunityHomeView.vue"), - beforeEnter: guardRoute, }, ];