diff --git a/src/components/CommunityComponents/CommunityHamburger.vue b/src/components/CommunityComponents/CommunityHamburger.vue index 1e0503ae596679aa7787bbd4e24d4f6ee7f76d61..c53a4d751caf362fd37a4cad34038edd1d4562cb 100644 --- a/src/components/CommunityComponents/CommunityHamburger.vue +++ b/src/components/CommunityComponents/CommunityHamburger.vue @@ -39,19 +39,19 @@ <script> import { LeaveCommunity } from "@/utils/apiutil"; +import CommunityAdminService from "@/services/community-admin.service"; export default { name: "CommunityHamburger", props: { communityID: Number, - admin: Boolean, }, data() { return { id: -1, + admin: false, }; }, - methods: { leaveCommunity: async function () { this.id = await this.$router.currentRoute.value.params.communityID; @@ -59,5 +59,8 @@ export default { this.$router.push("/"); }, }, + mounted() { + this.admin = CommunityAdminService.isUserAdmin(); + }, }; </script>