Skip to content

Commit 58360f2

Browse files
Meenu/Pr 1911 meenu hotfix live price card (binary-com#6813)
* auto-pull-translation * auto-pull-translation * auto-pull-translation * auto-pull-translation * fix: left crop issue fixed * fix: hotfix --------- Co-authored-by: meenu-deriv <[email protected]>
1 parent 58a7ca5 commit 58360f2

File tree

6 files changed

+17
-11
lines changed

6 files changed

+17
-11
lines changed

package-lock.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"@artsy/fresnel": "^6.2.1",
88
"@builder.io/partytown": "^0.8.1",
99
"@deriv-com/blocks": "^0.79.0",
10-
"@deriv-com/components": "^0.47.0",
10+
"@deriv-com/components": "^0.48.0",
1111
"@deriv-com/hooks": "^0.10.0",
1212
"@deriv-com/providers": "^0.11.0",
1313
"@deriv/analytics": "^1.4.4",

src/data/trustpilot.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"stars": 4.5,
33
"trustScore": 4.6,
4-
"numberOfReviews": "30,000"
4+
"numberOfReviews": "43,385"
55
}

src/features/pages/home/live-pricing-migration/cards/index.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,11 @@ const LiveMarketCard = <T extends MarketName>({
124124
<CardSlider
125125
variant="LiveMarketCard"
126126
swiperData={swiperOption}
127-
slideClasses="max-w-[296px] mr-800"
128-
className="w-screen !mr-[calc((-100vw+100%)/2)] lg:w-full lg:!mr-auto"
127+
slideClasses="max-w-[296px] !mr-gap-none !ml-gap-none"
128+
className="w-screen lg:w-full [&>*:nth-child(1)]:!gap-gap-lg"
129129
cards={livePriceData.slice(0, 4)}
130130
/>
131-
<div className="flex items-center flex-col">{children}</div>
131+
<div className="flex items-center flex-col ">{children}</div>
132132
</>
133133
)
134134
}

src/features/pages/home/live-pricing-migration/utils/index.ts

+4
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@ export const percentToDecimal = (percentStr) => {
55
interface SwiperOption {
66
spaceBetween: number
77
slidesPerView: number | 'auto'
8+
reverseDirection: true
9+
freeMode: true
810
}
911

1012
export const swiperOption: SwiperOption = {
1113
spaceBetween: 16,
1214
slidesPerView: 'auto',
15+
reverseDirection: true,
16+
freeMode: true,
1317
}
1418

1519
export const initialLiveMarketData = {

src/features/pages/home/years/index.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react'
22
import { Features } from '@deriv-com/blocks'
3+
import { swiperOption } from '../live-pricing-migration/utils'
34
import { cards } from './data'
45
import { Localize } from 'components/localization'
56

@@ -8,8 +9,9 @@ const TwentyYearsStrong = () => {
89
<Features.ContentSlider
910
title={<Localize translate_text="_t_We're 24+ years strong_t_" />}
1011
cardSliderProps={{
11-
slideClasses: 'max-w-[296px] !h-auto mr-800',
12-
className: 'w-screen !mr-[calc((-100vw+100%)/2)] lg:w-full lg:!mr-auto',
12+
swiperData: swiperOption,
13+
slideClasses: 'max-w-[296px] !h-auto !mr-gap-none !ml-gap-none',
14+
className: 'w-screen lg:w-full [&>*:nth-child(1)]:!gap-gap-lg ',
1315
variant: 'ContentBottom',
1416
cards: cards,
1517
}}

0 commit comments

Comments
 (0)