chore: Use types from the web package
This commit is contained in:
@@ -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,
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user