Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed Oct 25, 2023
1 parent 95fc6ec commit b48d18a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 33 deletions.
30 changes: 0 additions & 30 deletions apps/meteor/client/hooks/omnichannel/useMacLimitValidations.tsx

This file was deleted.

6 changes: 4 additions & 2 deletions apps/meteor/client/providers/OmnichannelProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { useHasLicenseModule } from '../../ee/client/hooks/useHasLicenseModule';
import { ClientLogger } from '../../lib/ClientLogger';
import type { OmnichannelContextValue } from '../contexts/OmnichannelContext';
import { OmnichannelContext } from '../contexts/OmnichannelContext';
import { useMacLimitValidations } from '../hooks/omnichannel/useMacLimitValidations';
import { useLicense } from '../hooks/useLicense';
import { useReactiveValue } from '../hooks/useReactiveValue';

const emptyContextValue: OmnichannelContextValue = {
Expand Down Expand Up @@ -76,7 +76,9 @@ const OmnichannelProvider: FC = ({ children }) => {
enabled: isPrioritiesEnabled,
});

const { isOverMacLimit } = useMacLimitValidations(enabled);
const { data: { preventedActions } = {} } = useLicense();

const isOverMacLimit = Boolean(preventedActions?.monthlyActiveContacts);

useEffect(() => {
if (!isPrioritiesEnabled) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ function SideBarItemTemplateWithData({
{unread + tunread?.length}
</Badge>
)}
<OmnichannelBadges room={room} />
{isOmnichannelRoom(room) && <OmnichannelBadges room={room} />}
</Margins>
);

Expand Down

0 comments on commit b48d18a

Please sign in to comment.