chore: Use types from the web package

This commit is contained in:
Faruk AYDIN
2024-01-15 13:30:48 +01:00
parent 7831f2925b
commit 159931a6ea
77 changed files with 934 additions and 378 deletions

View File

@@ -1,17 +1,19 @@
import { useQuery } from '@apollo/client';
import { IRole } from '@automatisch/types';
import { IRole } from 'types';
import { GET_ROLES } from 'graphql/queries/get-roles.ee';
type QueryResponse = {
getRoles: IRole[];
}
};
export default function useRoles() {
const { data, loading } = useQuery<QueryResponse>(GET_ROLES, { context: { autoSnackbar: false } });
const { data, loading } = useQuery<QueryResponse>(GET_ROLES, {
context: { autoSnackbar: false },
});
return {
roles: data?.getRoles || [],
loading
loading,
};
}