refactor: updated dashboard gql queries and components to use the new infra type of the updated schema (#3455)

This commit is contained in:
Joel Jacob Stephen
2023-11-01 23:40:19 +05:30
committed by GitHub
parent a215860782
commit 9dcbc4a126
19 changed files with 33 additions and 28 deletions

View File

@@ -72,9 +72,9 @@ const fetching = ref(true);
const error = ref(false);
const { client } = useClientHandle();
const route = useRoute();
const team = ref<TeamInfoQuery['admin']['teamInfo'] | undefined>();
const team = ref<TeamInfoQuery['infra']['teamInfo'] | undefined>();
const pendingInvites = ref<
TeamInfoQuery['admin']['teamInfo']['teamInvitations'] | undefined
TeamInfoQuery['infra']['teamInfo']['teamInvitations'] | undefined
>();
const getTeamInfo = async () => {
@@ -88,8 +88,8 @@ const getTeamInfo = async () => {
return toast.error(`${t('teams.load_info_error')}`);
}
if (result.data?.admin.teamInfo) {
team.value = result.data.admin.teamInfo;
if (result.data?.infra.teamInfo) {
team.value = result.data.infra.teamInfo;
pendingInvites.value = team.value.teamInvitations;
}
fetching.value = false;