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

Commit

Permalink
chore: fix the color by using text quill (#7814)
Browse files Browse the repository at this point in the history
Co-authored-by: Agrim Jain <[email protected]>
  • Loading branch information
agrim-deriv and Agrim Jain authored Jul 11, 2024
1 parent d5c78cd commit 42a0895
Showing 1 changed file with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useState } from 'react'
import Cookies from 'js-cookie'
import { Footer } from '@deriv-com/blocks'
import { qtJoin } from '@deriv/quill-design'
import { qtJoin, Text } from '@deriv/quill-design'
import {
EuFooterNavData,
RowFooterNavData,
Expand All @@ -19,6 +19,7 @@ import useThirdPartyFlags from 'components/hooks/use-third-party-flags'
import { getLocationPathname } from 'common/utility'
import useRegion from 'components/hooks/use-region'
import useBuildVariant from 'features/hooks/use-build-variant'
import { Localize } from 'components/localization'
// import { socialIconROW, socialIconEU, socialIconCareer } from './validate-social-icons-data'

const overrideWithLang = (buttons, lang) =>
Expand Down Expand Up @@ -60,10 +61,10 @@ export const MainFooter = () => {
const socialIconCareer = filterSocialIcons(career_social_media_icons, socialButtonsCareers)
const socialIconCPA = filterSocialIcons(cpa_social_media_icons, socialButtonsCPA)

const region_buttons = region === "eu" ? socialIconEU : is_cpa_plan ? socialIconCPA : socialIconROW
const region_buttons = region === 'eu' ? socialIconEU : is_cpa_plan ? socialIconCPA : socialIconROW
const buttons = is_career ? socialIconCareer : region_buttons
setSocialButtons(overrideWithLang(buttons, lang))
setWarnText(region !== "eu" && !is_cpa_plan ? warnText : null)
setWarnText(region !== 'eu' && !is_cpa_plan ? warnText : null)
}, [
lang,
region,
Expand All @@ -77,14 +78,21 @@ export const MainFooter = () => {

return (
<Footer.FooterBlock
warningText={warn_text}
warningText={warn_text && (
<Text className={`text-solid-slate-600 ${region !== 'eu' && !is_cpa_plan ? 'additional-warning-classname' : ''}`} size="sm">
<Localize
translate_text={warn_text}
values={{ loss_percent: 'some_value' }} // Replace 'some_value' with the appropriate value
/>
</Text>
)}
socialButtons={social_buttons}
banner={DerivGoBanner}
awards={IIPAward}
descriptionContent={DescriptionContent}
className={qtJoin((region === "eu" || is_cpa_plan) && 'mb-[120px] lg:mb-[80px]')}
className={qtJoin((region === 'eu' || is_cpa_plan) && 'mb-[120px] lg:mb-[80px]')}
>
<Footer.MainNavContent items={region === "eu" ? EuFooterNavData : RowFooterNavData} cols="six" />
<Footer.MainNavContent items={region === 'eu' ? EuFooterNavData : RowFooterNavData} cols='six' />
</Footer.FooterBlock>
)
}
Expand Down

0 comments on commit 42a0895

Please sign in to comment.