forked from deriv-com/deriv-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Thisyahlen/trah 2642/eu screen deriv platform section (deriv-com#12871)
* chore: add eu condition content to deriv platform section in tradershub * chore: add eu condition content to deriv platform section in tradershub * chore: readd back * chore: komen
- Loading branch information
1 parent
7f34999
commit 5eea607
Showing
13 changed files
with
122 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
1 change: 1 addition & 0 deletions
1
packages/tradershub/src/components/Loaders/CurrencySwitcherLoader/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as CurrencySwitcherLoader } from './CurrencySwitcherLoader'; |
12 changes: 12 additions & 0 deletions
12
packages/tradershub/src/components/Loaders/TitleDescriptionLoader/TitleDescriptionLoader.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react'; | ||
|
||
const TitleDescriptionLoader = () => ( | ||
<div className='lg:flex lg:flex-col'> | ||
<div className='grow space-y-500'> | ||
<div className='animate-pulse bg-solid-slate-100 w-4000 h-1000 rounded-200' /> | ||
<div className='animate-pulse bg-solid-slate-100 w-[300px] h-800 rounded-200' /> | ||
</div> | ||
</div> | ||
); | ||
|
||
export default TitleDescriptionLoader; |
1 change: 1 addition & 0 deletions
1
packages/tradershub/src/components/Loaders/TitleDescriptionLoader/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as TitleDescriptionLoader } from './TitleDescriptionLoader'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
export { default as CurrencySwitcherLoader } from './CurrencySwitcherLoader'; | ||
export * from './CurrencySwitcherLoader'; | ||
export * from './TitleDescriptionLoader'; | ||
export * from './TradingAppCardLoader'; |
32 changes: 0 additions & 32 deletions
32
...OptionsAndMultipliersSection/OptionsAndMultiplersHeading/OptionsAndMultipliersHeading.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
...ptionsAndMultipliersSection/OptionsAndMultipliersHeading/OptionsAndMultipliersHeading.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import React, { useMemo } from 'react'; | ||
import { useIsEuRegion } from '@deriv/api'; | ||
import { Heading, Text, useBreakpoint } from '@deriv/quill-design'; | ||
import { CurrencySwitcher } from '../../CurrencySwitcher'; | ||
import { TitleDescriptionLoader } from '../../Loaders'; | ||
import { StaticLink } from '../../StaticLink'; | ||
|
||
/** | ||
* `OptionsAndMultipliersHeading` is a component that renders the heading title and currency switcher. | ||
* @returns {React.ElementType} The `OptionsAndMultipliersHeading` component. | ||
*/ | ||
const OptionsAndMultipliersHeading = () => { | ||
const { isMobile } = useBreakpoint(); | ||
const { isEU, isSuccess } = useIsEuRegion(); | ||
|
||
const title = isEU ? 'Multipliers' : 'Options & multipliers'; | ||
|
||
const description = useMemo(() => { | ||
if (isEU) { | ||
return ( | ||
<Text className='space-y-50' size='sm'> | ||
Get the upside of CFDs without risking more than your initial stake with | ||
<StaticLink size='md' staticUrl='/trade-types/multiplier/'> | ||
multipliers | ||
</StaticLink> | ||
. | ||
</Text> | ||
); | ||
} | ||
return ( | ||
<Text className='space-y-50' size='sm'> | ||
Earn a range of payouts by correctly predicting market price movements with | ||
<StaticLink size='md' staticUrl='/trade-types/options/digital-options/up-and-down/'> | ||
options | ||
</StaticLink> | ||
, or get the upside of CFDs without risking more than your initial stake with | ||
<StaticLink size='md' staticUrl='/trade-types/multiplier/'> | ||
multipliers | ||
</StaticLink> | ||
. | ||
</Text> | ||
); | ||
}, [isEU]); | ||
|
||
if (!isSuccess) return <TitleDescriptionLoader />; | ||
|
||
return ( | ||
<div className='flex flex-col items-start justify-between lg:flex-row gap-800 lg:gap-2400'> | ||
<div className='lg:flex lg:flex-col gap-100'> | ||
{!isMobile && <Heading.H4>{title}</Heading.H4>} | ||
{description} | ||
</div> | ||
<CurrencySwitcher /> | ||
</div> | ||
); | ||
}; | ||
export default OptionsAndMultipliersHeading; |
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
...s/tradershub/src/components/OptionsAndMultipliersSection/OptionsAndMultipliersSection.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters