fix: admin dashboard bugs (#74)

This commit is contained in:
Joel Jacob Stephen
2023-04-07 03:23:55 +05:30
committed by GitHub
parent a33337ae0c
commit e54f837b83
8 changed files with 54 additions and 24 deletions

View File

@@ -157,7 +157,7 @@ import IconUserPlus from '~icons/lucide/user-plus';
import IconUserMinus from '~icons/lucide/user-minus';
import IconHelpCircle from '~icons/lucide/help-circle';
import { useClientHandle, useMutation } from '@urql/vue';
import { computed, onMounted, ref, watch } from 'vue';
import { computed, onMounted, onUnmounted, ref, watch } from 'vue';
import { useRoute } from 'vue-router';
import { useToast } from '../../composables/toast';
import {
@@ -195,9 +195,12 @@ const getTeamInfo = async () => {
fetching.value = false;
};
onMounted(async () => {
await getTeamInfo();
});
const emit = defineEmits<{
(e: 'update-team'): void;
}>();
onMounted(async () => await getTeamInfo());
onUnmounted(() => emit('update-team'));
// Update members tab after a change in the members list or member roles
const updateMembers = () => getTeamInfo();