Skip to content
Snippets Groups Projects
Commit 59e49c84 authored by Erik Borgeteien Hansen's avatar Erik Borgeteien Hansen
Browse files

cleanup

parent 53f1be14
No related branches found
No related tags found
2 merge requests!87Community request,!86Community admin
Pipeline #179944 passed
...@@ -43,18 +43,16 @@ import CommunityAdminService from "@/services/community-admin.service"; ...@@ -43,18 +43,16 @@ import CommunityAdminService from "@/services/community-admin.service";
export default { export default {
name: "CommunityHamburger", name: "CommunityHamburger",
props: {
communityID: Number,
},
data() { data() {
return { return {
id: -1, id: -1,
admin: false, admin: false,
communityID: -1,
}; };
}, },
methods: { methods: {
leaveCommunity: async function () { leaveCommunity: async function () {
this.id = await this.$router.currentRoute.value.params.communityID; this.id = this.$route.params.communityID;
await LeaveCommunity(this.id); await LeaveCommunity(this.id);
this.$router.push("/"); this.$router.push("/");
}, },
...@@ -64,5 +62,8 @@ export default { ...@@ -64,5 +62,8 @@ export default {
this.$route.params.communityID this.$route.params.communityID
); );
}, },
created() {
this.communityID = this.$route.params.communityID;
},
}; };
</script> </script>
...@@ -90,9 +90,8 @@ export default { ...@@ -90,9 +90,8 @@ export default {
}; };
}, },
methods: { methods: {
getCommunityFromAPI: async function () { async getCommunityFromAPI() {
this.communityID = await this.$router.currentRoute.value.params this.communityID = this.$route.params.communityID;
.communityID;
this.community = await GetCommunity(this.communityID); this.community = await GetCommunity(this.communityID);
}, },
getListingsOfCommunityFromAPI: async function () { getListingsOfCommunityFromAPI: async function () {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment