Skip to content

Commit

Permalink
fix: incorrect validation on useIsOverMacLimit
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksandernsilva committed Oct 10, 2023
1 parent 6a294e5 commit 149b0ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/meteor/client/hooks/omnichannel/useIsOverMacLimit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useQuery } from '@tanstack/react-query';

export const useIsOverMacLimit = (): boolean => {
const getMacLimit = useEndpoint('GET', '/v1/omnichannel/mac/check');
const { data: { onLimit: isOverMacLimit = false } = {} } = useQuery(['/v1/omnichannel/mac/check'], () => getMacLimit());
const { data: { onLimit = false } = {} } = useQuery(['/v1/omnichannel/mac/check'], () => getMacLimit());

return !!isOverMacLimit;
return !onLimit;
};

0 comments on commit 149b0ca

Please sign in to comment.