From 983a8e4abf802f7e9d8d3175e21205d8bcb3d5c2 Mon Sep 17 00:00:00 2001 From: Aleksander Nicacio da Silva Date: Fri, 6 Oct 2023 17:44:23 -0300 Subject: [PATCH] fix: reading the endpoint incorrectly --- apps/meteor/client/hooks/omnichannel/useIsOverMacLimit.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/meteor/client/hooks/omnichannel/useIsOverMacLimit.tsx b/apps/meteor/client/hooks/omnichannel/useIsOverMacLimit.tsx index f09cb858bcfd9..fe9c14b93019f 100644 --- a/apps/meteor/client/hooks/omnichannel/useIsOverMacLimit.tsx +++ b/apps/meteor/client/hooks/omnichannel/useIsOverMacLimit.tsx @@ -6,7 +6,7 @@ export const useIsOverMacLimit = (): boolean => { const queryClient = useQueryClient(); const notifyLogged = useStream('notify-logged'); const getMacLimit = useEndpoint('GET', '/v1/omnichannel/mac/check'); - const { data: isOverMacLimit } = useQuery(['/v1/omnichannel/mac/check'], () => getMacLimit()); + const { data: { onLimit: isOverMacLimit = false } = {} } = useQuery(['/v1/omnichannel/mac/check'], () => getMacLimit()); useEffect(() => { return notifyLogged(`mac.limit`, ({ limitReached }) => {