Skip to content

Commit

Permalink
fix: update to check intercom for whatsapp
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuzhy-Deriv committed Dec 30, 2024
1 parent 3c780f8 commit c96b71b
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
import React, { Fragment } from 'react';

import { Icon, Popover } from '@deriv/components';
import { useIsIntercomAvailable, useIsLiveChatWidgetAvailable } from '@deriv/hooks';
import { localize } from '@deriv/translations';
import { useDevice } from '@deriv-com/ui';
import { URLConstants } from '@deriv-com/utils';

const WhatsApp = ({ showPopover, onClick }: { showPopover?: boolean; onClick?: () => void }) => {
const { isDesktop } = useDevice();

const { is_livechat_available } = useIsLiveChatWidgetAvailable();
const icAvailable = useIsIntercomAvailable();

if (!is_livechat_available && !icAvailable) return null;

if (!isDesktop)
return (
<Fragment>
Expand Down

0 comments on commit c96b71b

Please sign in to comment.