Skip to content

Commit

Permalink
fix cypress tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nchaulet committed Apr 30, 2024
1 parent ce805e1 commit 682cb39
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,10 @@ async function checkPermissions() {
} catch (err) {
permissionsError = 'REQUEST_ERROR';
}
return permissionsError;
return { error: permissionsError };
}

export const useCheckPermissions = () => {
const { data: permissionsError, isInitialLoading } = useQuery(
['fetch-check-permissions'],
checkPermissions
);
return { isPermissionsLoading: isInitialLoading, permissionsError };
const { data, isInitialLoading } = useQuery(['fetch-check-permissions'], checkPermissions);
return { isPermissionsLoading: isInitialLoading, permissionsError: data?.error };
};

0 comments on commit 682cb39

Please sign in to comment.