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

Commit

Permalink
fix: track js issue (#5765)
Browse files Browse the repository at this point in the history
  • Loading branch information
mayuran-deriv authored Oct 13, 2023
1 parent 564bf78 commit f9d1b2e
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const NavCardItems = ({ items }: NavCardItemsProps) => {

return (
<>
{content.map(({ id, data }) => {
{content?.map(({ id, data }) => {
const { url, title, content, icon } = data
const nav_card_link = typeof url === 'function' ? url(filter_config) : url
const nav_card_content =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const NavSectionColumn = ({ item }: NavSectionColumnProps) => {

const content = useVisibleContent({ config: filter_config, content: item.data.section })

if (content.length) {
if (content?.length) {
return (
<Flex.Box
direction="col"
Expand Down
2 changes: 1 addition & 1 deletion src/features/components/templates/footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const Footer = ({ no_footer_links = false }: FooterProps) => {
>
{!no_footer_links && (
<Flex.Box justify="between" visible="larger-than-tablet">
{content.map((contentItem) => (
{content?.map((contentItem) => (
<FooterLinksColumn key={contentItem.id} item={contentItem} />
))}
</Flex.Box>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import NavSectionContainer from 'features/components/organisms/navigation/nav-se

const NavDropItems = ({ items }: { items: NavSingleColumnItems | NavMultiColumnItems }) => {
if (items.type === 'single-column') {
return <NavCardItems items={items.content} />
return <NavCardItems items={items?.content} />
}
return <NavSectionContainer items={items.content} />
return <NavSectionContainer items={items?.content} />
}

export default NavDropItems
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const NavSingleItem = ({ item, is_mobile }: NavSingleItemProps) => {
size={is_mobile ? 'large' : 'medium'}
padding_block="2x"
padding_inline="8x"
url={item.content}
url={item?.content}
weight={is_mobile ? 'bold' : 'normal'}
font_family="UBUNTU"
onClick={onCloseMenu}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const TradingPlatformWhatHave = ({ items }: TradingPlatformWhatHaveProps) => {
return (
<FlexBox.Box
className={what_have_wrapper}
key={content.id}
key={content?.id}
direction={'col'}
margin_block={'10x'}
align={'center'}
Expand All @@ -32,14 +32,14 @@ const TradingPlatformWhatHave = ({ items }: TradingPlatformWhatHaveProps) => {
>
<FlexBox.Box direction={'col'} justify={'center'} className={flex_items}>
<Typography.Heading mb={'6x'} align="left" textcolor="primary" mr="5x">
<Localize translate_text={content.title} />
<Localize translate_text={content?.title} />
</Typography.Heading>
<Typography.Paragraph align={'left'} mb={'12x'} md={{ mb: '0x' }}>
<Localize translate_text={content.subtitle} />
<Localize translate_text={content?.subtitle} />
</Typography.Paragraph>
</FlexBox.Box>
<FlexBox.Box className={image_item} md={{ padding_inline: '40x' }}>
{content.image}
{content?.image}
</FlexBox.Box>
</FlexBox.Box>
)
Expand Down
2 changes: 1 addition & 1 deletion src/features/pages/check-email/check-email.steps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const CheckEmailSteps = () => {
<Flex.Box key={item.id} gap="8x" justify="start" align="center">
<Icon size="xlarge" src={item.icon} alt={item.alt} />
<Typography.Paragraph>
<Localize translate_text={item.content} />
<Localize translate_text={item?.content} />
</Typography.Paragraph>
</Flex.Box>
))}
Expand Down
8 changes: 4 additions & 4 deletions src/features/pages/deriv-ez/what-have/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const WhatIsDerivEZ = () => {
return (
<FlexBox.Box
className={what_have_wrapper}
key={content.id}
key={content?.id}
direction={'col'}
margin_block={'10x'}
justify={'around'}
Expand All @@ -29,18 +29,18 @@ const WhatIsDerivEZ = () => {
>
<FlexBox.Box direction={'col'} justify={'center'}>
<Typography.Heading mb={'6x'} align="left" textcolor="primary">
<Localize translate_text={content.title} />
<Localize translate_text={content?.title} />
</Typography.Heading>
<Typography.Paragraph
className={what_have_text}
align={'left'}
mb={'12x'}
md={{ mb: '0x' }}
>
<Localize translate_text={content.subtitle} />
<Localize translate_text={content?.subtitle} />
</Typography.Paragraph>
</FlexBox.Box>
{content.image}
{content?.image}
</FlexBox.Box>
)
})}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/_vertical-carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const VerticalCarousel = ({ contents }: VerticalCarouselProps) => {
return (
<Carousel has_autoplay autoplay_delay={6000} autoplay_interval={2500} {...settings}>
{contents.map((content) => (
<StyledHeader as="h3" type="sub-section-title" color="white" key={content.id}>
<StyledHeader as="h3" type="sub-section-title" color="white" key={content?.id}>
<Localize translate_text={content.text} />
</StyledHeader>
))}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/landing/jump-indices/_leverages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const Leverages = () => {
return (
<MainWrapper>
<ParentWrapper>
{content.map(({ imgsrc, header, title }) => (
{content?.map(({ imgsrc, header, title }) => (
<EachWrapper key={title}>
<ImgWrapper src={imgsrc} />
<StyledHeader type="section-title">
Expand Down
4 changes: 2 additions & 2 deletions src/pages/markets/components/sections/_other-markets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ const Card = ({ market }: CardProps) => {
<Text size="16px" mt="0.8rem">
<Localize
translate_text={
is_eu ? markets_type[market].content_eu : markets_type[market].content
is_eu ? markets_type[market].content_eu : markets_type[market]?.content
}
/>
</Text>
Expand All @@ -291,7 +291,7 @@ const MobileCard = ({ market }: CardProps) => {
</Text>
</Flex>
<Text size="14px" mb="3rem">
<Localize translate_text={markets_type[market].content} />
<Localize translate_text={markets_type[market]?.content} />
</Text>
<LearnMore to={markets_type[market].to} visibility="true">
<Text>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/markets/components/sub-markets/_digital-options.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ const DigitalOptions = ({ market_name, market_type, options_list }: DigitalOptio
{option.map((content, idx) => (
<Col key={idx}>
<AvailableOptions
content={content.text}
content_components={content.text_component}
content={content?.text}
content_components={content?.text_component}
{...content}
/>
</Col>
Expand Down
8 changes: 4 additions & 4 deletions src/pages/trade-types/accumulators/_what-are-accumulators.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ const WhatAreAccumulators = () => {
{accumulator_content.map((content, index) => (
<StyledBox
key={index}
item_title={content.item_title}
text={content.text}
item_title={content?.item_title}
text={content?.text}
icon={
<img
width="48px"
height="48px"
src={content.src}
alt={localize(content.alt)}
src={content?.src}
alt={localize(content?.alt)}
/>
}
></StyledBox>
Expand Down
2 changes: 1 addition & 1 deletion src/themes/plugin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { transformPadding } from './padding'
const STYLIS_PROPERTY_CONTEXT = 1

const transformCSSProperties = (content: string) => {
const [prop, value] = content.split(':')
const [prop, value] = content?.split(':')
if (!value) {
return
}
Expand Down

1 comment on commit f9d1b2e

@vercel
Copy link

@vercel vercel bot commented on f9d1b2e Oct 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

deriv-com – ./

deriv-com.binary.sx
deriv-com-git-master.binary.sx

Please sign in to comment.