Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

chore: disable whatsapp #5852

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion crowdin/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,6 @@
"978785299": "How do I block someone on Deriv P2P?",
"980197763": "Swap short (Daily %)",
"980696453": "DTrader | Online Trading Platform | Deriv.com",
"982146443": "WhatsApp",
"987462335": "payment methods",
"992411597": "If you select ‘Even’, you will win the payout if the last digit of the last tick is an even number (i.e. 2, 4, 6, 8, or 0).",
"992485806": "Your position is automatically closed when your stop loss level is at <0>1.1750</0> and when your stop loss pip value is <0>24 USD</0>.",
Expand Down
2 changes: 0 additions & 2 deletions src/components/layout/layout-overlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { bannerTypes } from 'common/constants'
import CfdWarningBanner from 'features/components/molecules/layout-overlay/cfd-warning-banner'

const LiveChat = Loadable(() => import('./livechat'))
const WhatsApp = Loadable(() => import('./whatsapp'))

const OverlayContainer = styled.div<{ is_rtl: boolean }>`
pointer-events: none;
Expand All @@ -26,7 +25,6 @@ const LayoutOverlay = () => {
return (
<OverlayContainer is_rtl={is_rtl} id="overlay-container">
<LiveChat />
<WhatsApp />
<BannerAlert bannerType={bannerTypes.cookieBanner} />
<CfdWarningBanner />
</OverlayContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import CfdWarningBanner from './cfd-warning-banner'
import Flex from 'features/components/atoms/flex-box'
import { useIsRtl } from 'components/hooks/use-isrtl'

const LiveChatButton = loadable(() => pMinDelay(import('./live-chat-button'), 5000))
const WhatsappButton = loadable(() => pMinDelay(import('./whats-app-button'), 5000))
const LiveChatButton = loadable(() => pMinDelay(import('./live-chat-button'), 3000))
const CookieBanner = lazy(() => pMinDelay(import('./cookie-banner'), 5000))

const LayoutOverlay = () => {
Expand Down Expand Up @@ -35,7 +34,6 @@ const LayoutOverlay = () => {
</Flex.Box>
<Flex.Box direction="col">
<LiveChatButton />
<WhatsappButton />
</Flex.Box>
</Flex.Box>
<CfdWarningBanner />
Expand Down
36 changes: 0 additions & 36 deletions src/pages/help-centre/components/_didnt-find-answer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import { Localize } from 'components/localization'
import { useLivechat } from 'components/hooks/use-livechat'
import device from 'themes/device'
import ContactUsIcon from 'images/svg/help/livechat-red.svg'
import WhatsAppSVG from 'images/svg/help/whatsapp.svg'
import { whatsapp_url } from 'common/constants'

const DidntFindYourAnswerWrapper = styled.div`
background: var(--color-black);
Expand Down Expand Up @@ -37,24 +35,6 @@ const Text = styled(Header)`
font-weight: bold;
}
`
const WhatsAppButton = styled.button`
background-color: var(--color-green-3);
border: 2px solid var(--color-green-3);
color: var(--color-white);
font-size: 14px;
border-radius: 4px;
height: fit-content;
padding: 10px 16px;
font-weight: bold;
margin-left: 16px;
width: inherit;

&:hover {
background-color: var(--color-red);
border: 2px solid var(--color-red);
color: var(--color-white);
}
`
const ChatButton = styled(Button)`
@media ${device.tabletL} {
width: 100%;
Expand All @@ -68,15 +48,9 @@ const ButtonWrapper = styled.div`
}
`

const WhatsAppIcon = styled.img`
margin: -3px 8px -3px 0;
`

const DidntFindYourAnswerBanner = () => {
const [is_livechat_interactive, LC_API] = useLivechat()

const openChatWindow = () => LC_API.open_chat_window()
const openWhatsappUrl = () => window.open(whatsapp_url, '_blank')

return (
<DidntFindYourAnswerWrapper>
Expand All @@ -90,16 +64,6 @@ const DidntFindYourAnswerBanner = () => {
<ChatButton secondary onClick={openChatWindow}>
<Localize translate_text="_t_Chat_t_" />
</ChatButton>

<WhatsAppButton onClick={openWhatsappUrl}>
<WhatsAppIcon
src={WhatsAppSVG}
alt="whatsapp-icon"
height="16"
width="16"
/>
<Localize translate_text="_t_WhatsApp_t_" />
</WhatsAppButton>
</ButtonWrapper>
)}
</DidntFindYourAnswerWrapper>
Expand Down
Loading