From f9d1b2e4d3a95d4d442f77d21a1ce53cc906d06a Mon Sep 17 00:00:00 2001 From: mayuran-deriv <129507167+mayuran-deriv@users.noreply.github.com> Date: Fri, 13 Oct 2023 13:37:26 +0400 Subject: [PATCH] fix: track js issue (#5765) --- .../organisms/navigation/nav-card-items/index.tsx | 2 +- .../navigation/nav-sections-container/section-column.tsx | 2 +- src/features/components/templates/footer/index.tsx | 2 +- .../navigation/template/nav-drop-items/index.tsx | 4 ++-- .../navigation/template/nav-single-item/index.tsx | 2 +- .../templates/trade-platform/what-have/index.tsx | 8 ++++---- src/features/pages/check-email/check-email.steps.tsx | 2 +- src/features/pages/deriv-ez/what-have/index.tsx | 8 ++++---- src/pages/home/_vertical-carousel.tsx | 2 +- src/pages/landing/jump-indices/_leverages.tsx | 2 +- src/pages/markets/components/sections/_other-markets.tsx | 4 ++-- .../markets/components/sub-markets/_digital-options.tsx | 4 ++-- .../trade-types/accumulators/_what-are-accumulators.tsx | 8 ++++---- src/themes/plugin/index.ts | 2 +- 14 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/features/components/organisms/navigation/nav-card-items/index.tsx b/src/features/components/organisms/navigation/nav-card-items/index.tsx index 6776319f375..501385e4aa7 100644 --- a/src/features/components/organisms/navigation/nav-card-items/index.tsx +++ b/src/features/components/organisms/navigation/nav-card-items/index.tsx @@ -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 = diff --git a/src/features/components/organisms/navigation/nav-sections-container/section-column.tsx b/src/features/components/organisms/navigation/nav-sections-container/section-column.tsx index ecc7909a8e5..f725cd27c3f 100644 --- a/src/features/components/organisms/navigation/nav-sections-container/section-column.tsx +++ b/src/features/components/organisms/navigation/nav-sections-container/section-column.tsx @@ -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 ( { > {!no_footer_links && ( - {content.map((contentItem) => ( + {content?.map((contentItem) => ( ))} diff --git a/src/features/components/templates/navigation/template/nav-drop-items/index.tsx b/src/features/components/templates/navigation/template/nav-drop-items/index.tsx index 2ed453aa586..176ae181ae0 100644 --- a/src/features/components/templates/navigation/template/nav-drop-items/index.tsx +++ b/src/features/components/templates/navigation/template/nav-drop-items/index.tsx @@ -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 + return } - return + return } export default NavDropItems diff --git a/src/features/components/templates/navigation/template/nav-single-item/index.tsx b/src/features/components/templates/navigation/template/nav-single-item/index.tsx index 23baebebc9a..46b79a8bc69 100644 --- a/src/features/components/templates/navigation/template/nav-single-item/index.tsx +++ b/src/features/components/templates/navigation/template/nav-single-item/index.tsx @@ -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} diff --git a/src/features/components/templates/trade-platform/what-have/index.tsx b/src/features/components/templates/trade-platform/what-have/index.tsx index c92278e61e3..cf4dbe62710 100644 --- a/src/features/components/templates/trade-platform/what-have/index.tsx +++ b/src/features/components/templates/trade-platform/what-have/index.tsx @@ -22,7 +22,7 @@ const TradingPlatformWhatHave = ({ items }: TradingPlatformWhatHaveProps) => { return ( { > - + - + - {content.image} + {content?.image} ) diff --git a/src/features/pages/check-email/check-email.steps.tsx b/src/features/pages/check-email/check-email.steps.tsx index b9b67840939..91dd8e6fe6b 100644 --- a/src/features/pages/check-email/check-email.steps.tsx +++ b/src/features/pages/check-email/check-email.steps.tsx @@ -54,7 +54,7 @@ const CheckEmailSteps = () => { - + ))} diff --git a/src/features/pages/deriv-ez/what-have/index.tsx b/src/features/pages/deriv-ez/what-have/index.tsx index bc3d211a273..7f380921f64 100644 --- a/src/features/pages/deriv-ez/what-have/index.tsx +++ b/src/features/pages/deriv-ez/what-have/index.tsx @@ -18,7 +18,7 @@ const WhatIsDerivEZ = () => { return ( { > - + { mb={'12x'} md={{ mb: '0x' }} > - + - {content.image} + {content?.image} ) })} diff --git a/src/pages/home/_vertical-carousel.tsx b/src/pages/home/_vertical-carousel.tsx index c3305cfbe47..5c9aa5af791 100644 --- a/src/pages/home/_vertical-carousel.tsx +++ b/src/pages/home/_vertical-carousel.tsx @@ -40,7 +40,7 @@ const VerticalCarousel = ({ contents }: VerticalCarouselProps) => { return ( {contents.map((content) => ( - + ))} diff --git a/src/pages/landing/jump-indices/_leverages.tsx b/src/pages/landing/jump-indices/_leverages.tsx index da7ace3baa8..65957f2f7fc 100644 --- a/src/pages/landing/jump-indices/_leverages.tsx +++ b/src/pages/landing/jump-indices/_leverages.tsx @@ -103,7 +103,7 @@ const Leverages = () => { return ( - {content.map(({ imgsrc, header, title }) => ( + {content?.map(({ imgsrc, header, title }) => ( diff --git a/src/pages/markets/components/sections/_other-markets.tsx b/src/pages/markets/components/sections/_other-markets.tsx index c159694195f..106c4149897 100644 --- a/src/pages/markets/components/sections/_other-markets.tsx +++ b/src/pages/markets/components/sections/_other-markets.tsx @@ -265,7 +265,7 @@ const Card = ({ market }: CardProps) => { @@ -291,7 +291,7 @@ const MobileCard = ({ market }: CardProps) => { - + diff --git a/src/pages/markets/components/sub-markets/_digital-options.tsx b/src/pages/markets/components/sub-markets/_digital-options.tsx index 2074973b56a..a8bacb2c117 100644 --- a/src/pages/markets/components/sub-markets/_digital-options.tsx +++ b/src/pages/markets/components/sub-markets/_digital-options.tsx @@ -48,8 +48,8 @@ const DigitalOptions = ({ market_name, market_type, options_list }: DigitalOptio {option.map((content, idx) => ( diff --git a/src/pages/trade-types/accumulators/_what-are-accumulators.tsx b/src/pages/trade-types/accumulators/_what-are-accumulators.tsx index 53af40df88e..9632708998a 100644 --- a/src/pages/trade-types/accumulators/_what-are-accumulators.tsx +++ b/src/pages/trade-types/accumulators/_what-are-accumulators.tsx @@ -43,14 +43,14 @@ const WhatAreAccumulators = () => { {accumulator_content.map((content, index) => ( } > diff --git a/src/themes/plugin/index.ts b/src/themes/plugin/index.ts index 91848acd4f9..63082146d88 100644 --- a/src/themes/plugin/index.ts +++ b/src/themes/plugin/index.ts @@ -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 }