From bc10f2fa8880a25c375271a102cdef92f9b73813 Mon Sep 17 00:00:00 2001 From: Aleksander Nicacio da Silva Date: Fri, 6 Oct 2023 18:17:10 -0300 Subject: [PATCH] fix: incorrect validation on useIsOverMacLimit --- apps/meteor/client/hooks/omnichannel/useIsOverMacLimit.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/meteor/client/hooks/omnichannel/useIsOverMacLimit.tsx b/apps/meteor/client/hooks/omnichannel/useIsOverMacLimit.tsx index bf558c8d92417..e8e9ed17288fb 100644 --- a/apps/meteor/client/hooks/omnichannel/useIsOverMacLimit.tsx +++ b/apps/meteor/client/hooks/omnichannel/useIsOverMacLimit.tsx @@ -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; };