|
1 | 1 | import React from 'react'
|
2 | 2 | import PropTypes from 'prop-types'
|
3 | 3 | import styled, { css } from 'styled-components'
|
4 |
| -import { SectionContainer, Flex, FlexGridContainer, EU, NonEU, ROW } from 'components/containers' |
5 | 4 | import {
|
6 |
| - Text, |
7 |
| - Card, |
8 |
| - Header, |
9 |
| - NavCard, |
10 |
| - CardLink, |
11 |
| - LocalizedLinkText, |
12 |
| - Divider, |
13 |
| -} from 'components/elements' |
| 5 | + SectionContainer, |
| 6 | + Flex, |
| 7 | + FlexGridContainer, |
| 8 | + EU, |
| 9 | + NonEU, |
| 10 | + ROW, |
| 11 | + UKEU, |
| 12 | +} from 'components/containers' |
| 13 | +import { Text, Card, Header, NavCard, CardLink, LocalizedLinkText } from 'components/elements' |
14 | 14 | import { localize, LocalizedLink, Localize } from 'components/localization'
|
15 | 15 | import { getCountryRule } from 'components/containers/visibility'
|
16 | 16 | import { binary_bot_url } from 'common/constants'
|
@@ -44,10 +44,6 @@ import Story from 'images/svg/menu/story.svg'
|
44 | 44 | import SyntheticIndices from 'images/svg/custom/synthetic-indices-nav.svg'
|
45 | 45 | import TraderTool from 'images/svg/custom/trader-tool-nav.svg'
|
46 | 46 |
|
47 |
| -const MarginDivider = styled(Divider)` |
48 |
| - margin: 0 0.8rem; |
49 |
| -` |
50 |
| - |
51 | 47 | const StyledText = styled(Text)`
|
52 | 48 | font-size: var(--text-size-xs);
|
53 | 49 | color: var(--color-grey-5);
|
@@ -269,11 +265,28 @@ OtherPlatform.propTypes = {
|
269 | 265 | }
|
270 | 266 |
|
271 | 267 | export const NavPlatform = ({ onClick, is_ppc, is_ppc_redirect }) => {
|
| 268 | + const getDtraderText = () => ( |
| 269 | + <NavCard |
| 270 | + aria_label="Dtrader" |
| 271 | + icon={() => <img src={DTrader} alt="" width="32" height="32" />} |
| 272 | + content={ |
| 273 | + <Localize translate_text="A whole new trading experience on a powerful yet easy to use platform." /> |
| 274 | + } |
| 275 | + title={<Localize translate_text="DTrader" />} |
| 276 | + onClick={onClick} |
| 277 | + to="/dtrader/" |
| 278 | + /> |
| 279 | + ) |
272 | 280 | return (
|
273 | 281 | <Flex>
|
274 | 282 | {!is_ppc && (
|
275 | 283 | <>
|
276 |
| - <Flex direction="column" wrap="wrap" jc="flex-start"> |
| 284 | + <Flex |
| 285 | + direction="column" |
| 286 | + wrap="wrap" |
| 287 | + jc="flex-start" |
| 288 | + style={{ boxShadow: 'inset -1px 0px 0px var(--color-grey-8)' }} |
| 289 | + > |
277 | 290 | <StyledText>{localize('Trade types')}</StyledText>
|
278 | 291 | <NavCard
|
279 | 292 | aria_label="CFDs"
|
@@ -310,7 +323,6 @@ export const NavPlatform = ({ onClick, is_ppc, is_ppc_redirect }) => {
|
310 | 323 | </Flex>
|
311 | 324 | </>
|
312 | 325 | )}
|
313 |
| - <MarginDivider width="2px" height="100%" color="grey-8" /> |
314 | 326 | <Flex direction="column" wrap="wrap" jc="flex-start">
|
315 | 327 | <StyledText>{localize('Trading platforms')}</StyledText>
|
316 | 328 | <NavCard
|
@@ -351,57 +363,48 @@ export const NavPlatform = ({ onClick, is_ppc, is_ppc_redirect }) => {
|
351 | 363 | />
|
352 | 364 | </>
|
353 | 365 | </ROW>
|
| 366 | + <UKEU>{getDtraderText()}</UKEU> |
354 | 367 | </Flex>
|
355 |
| - <Flex direction="column" wrap="wrap" jc="flex-start"> |
356 |
| - <EmptySpace /> |
357 |
| - <NavCard |
358 |
| - aria_label="Dtrader" |
359 |
| - icon={() => <img src={DTrader} alt="" width="32" height="32" />} |
360 |
| - content={ |
361 |
| - <Localize translate_text="A whole new trading experience on a powerful yet easy to use platform." /> |
362 |
| - } |
363 |
| - title={<Localize translate_text="DTrader" />} |
364 |
| - onClick={onClick} |
365 |
| - to="/dtrader/" |
366 |
| - /> |
367 |
| - <ROW> |
368 |
| - <> |
369 |
| - <NavCard |
370 |
| - aria_label="Deriv GO" |
371 |
| - icon={() => <img src={DerivGo} alt="" width="32" height="32" />} |
372 |
| - content={ |
373 |
| - <Localize translate_text="Trade multipliers on forex, cryptocurrencies, and synthetic indices with our mobile app." /> |
374 |
| - } |
375 |
| - title={<Localize translate_text="Deriv GO" />} |
376 |
| - onClick={onClick} |
377 |
| - to="/landing/deriv-go/" |
378 |
| - /> |
379 |
| - <NavCard |
380 |
| - aria_label="DBot" |
381 |
| - icon={() => <img src={DBot} alt="" width="32" height="32" />} |
382 |
| - content={ |
383 |
| - <Localize translate_text="Automated trading at your fingertips. No coding needed." /> |
384 |
| - } |
385 |
| - title={<Localize translate_text="DBot" />} |
386 |
| - onClick={onClick} |
387 |
| - to="/dbot/" |
388 |
| - /> |
389 |
| - <NavCard |
390 |
| - aria_label="Binary Bot" |
391 |
| - icon={() => <img src={BinaryBot} alt="" width="32" height="32" />} |
392 |
| - content={ |
393 |
| - <Localize translate_text='Our classic "drag-and-drop" tool for creating trading bots, featuring pop-up trading charts, for advanced users.' /> |
394 |
| - } |
395 |
| - title={<Localize translate_text="Binary Bot" />} |
396 |
| - to={binary_bot_url} |
397 |
| - external="true" |
398 |
| - target="_blank" |
399 |
| - onClick={onClick} |
400 |
| - otherLinkProps={{ rel: 'noopener noreferrer' }} |
401 |
| - /> |
402 |
| - </> |
403 |
| - </ROW> |
404 |
| - </Flex> |
| 368 | + <ROW> |
| 369 | + <Flex direction="column" wrap="wrap" jc="flex-start"> |
| 370 | + <EmptySpace /> |
| 371 | + |
| 372 | + {getDtraderText()} |
| 373 | + <NavCard |
| 374 | + aria_label="Deriv GO" |
| 375 | + icon={() => <img src={DerivGo} alt="" width="32" height="32" />} |
| 376 | + content={ |
| 377 | + <Localize translate_text="Trade multipliers on forex, cryptocurrencies, and synthetic indices with our mobile app." /> |
| 378 | + } |
| 379 | + title={<Localize translate_text="Deriv GO" />} |
| 380 | + onClick={onClick} |
| 381 | + to="/landing/deriv-go/" |
| 382 | + /> |
| 383 | + <NavCard |
| 384 | + aria_label="DBot" |
| 385 | + icon={() => <img src={DBot} alt="" width="32" height="32" />} |
| 386 | + content={ |
| 387 | + <Localize translate_text="Automated trading at your fingertips. No coding needed." /> |
| 388 | + } |
| 389 | + title={<Localize translate_text="DBot" />} |
| 390 | + onClick={onClick} |
| 391 | + to="/dbot/" |
| 392 | + /> |
| 393 | + <NavCard |
| 394 | + aria_label="Binary Bot" |
| 395 | + icon={() => <img src={BinaryBot} alt="" width="32" height="32" />} |
| 396 | + content={ |
| 397 | + <Localize translate_text='Our classic "drag-and-drop" tool for creating trading bots, featuring pop-up trading charts, for advanced users.' /> |
| 398 | + } |
| 399 | + title={<Localize translate_text="Binary Bot" />} |
| 400 | + to={binary_bot_url} |
| 401 | + external="true" |
| 402 | + target="_blank" |
| 403 | + onClick={onClick} |
| 404 | + otherLinkProps={{ rel: 'noopener noreferrer' }} |
| 405 | + /> |
| 406 | + </Flex> |
| 407 | + </ROW> |
405 | 408 | </Flex>
|
406 | 409 | )
|
407 | 410 | }
|
|
0 commit comments