Skip to content

Commit

Permalink
Nuzhy/TRAH-5083/whatsapp icon missing issue (#17904)
Browse files Browse the repository at this point in the history
* fix: remove livechat check for whatsapp

* fix: update to check intercom for whatsapp
  • Loading branch information
Nuzhy-Deriv authored Jan 6, 2025
1 parent 6564b3a commit 3576747
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions packages/core/src/App/Components/Elements/WhatsApp/whatsapp.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
import React, { Fragment } from 'react';
import { Popover, Icon } from '@deriv/components';

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';
import { useGrowthbookGetFeatureValue, useIsLiveChatWidgetAvailable } from '@deriv/hooks';

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

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

const [enable_freshworks_live_chat] = useGrowthbookGetFeatureValue({
featureFlag: 'enable_freshworks_live_chat',
});

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

if (!isDesktop)
return (
Expand Down

0 comments on commit 3576747

Please sign in to comment.