diff --git a/src/components/CommunityComponents/CommunityHamburger.vue b/src/components/CommunityComponents/CommunityHamburger.vue index f9d4b41f9ca426b890e492b28c169c080954d804..391a9ab232be3ec69eefd513b060f274e7dcd1b4 100644 --- a/src/components/CommunityComponents/CommunityHamburger.vue +++ b/src/components/CommunityComponents/CommunityHamburger.vue @@ -57,8 +57,8 @@ export default { this.$router.push("/"); }, }, - mounted() { - this.admin = CommunityAdminService.isUserAdmin( + async mounted() { + this.admin = await CommunityAdminService.isUserAdmin( this.$route.params.communityID ); }, diff --git a/src/views/CommunityViews/CommunityView.vue b/src/views/CommunityViews/CommunityView.vue index 8755c39e632108ccca0f9ed1ce84f5db986e8105..7e92e9bf98ed5cd65feb4f4f27f39f6192e61afd 100644 --- a/src/views/CommunityViews/CommunityView.vue +++ b/src/views/CommunityViews/CommunityView.vue @@ -40,13 +40,13 @@ export default { this.publicCommunities = await getVisibleGroups(); this.loggedIn = this.$store.state.user.token !== null; if (!this.loggedIn) return; - this.myCommunities = await getMyGroups(); - }, - mounted() { + // Double loop is bad; find a better way to do this for (var i = 0; i < this.publicCommunities.length; i++) { for (var j = 0; j < this.myCommunities.length; j++) { + console.log(this.publicCommunities[i]); + console.log(this.myCommunities[j]); if ( this.publicCommunities[i].communityId === this.myCommunities[j].communityId