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

Commit

Permalink
feat: added hide in condition to markets
Browse files Browse the repository at this point in the history
  • Loading branch information
hasan-deriv committed Sep 25, 2023
1 parent 841affb commit 0e47b1d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export type MarketPageType =
export type OtherMarketsConfig = {
current_market: MarketPageType
is_eu: boolean
hide_in: MarketPageType
}

export type SmartOtherMarketsItem = TSmartContent<CardType, OtherMarketsConfig>
Expand Down Expand Up @@ -117,6 +118,7 @@ export const other_markets_items: SmartOtherMarketsItem[] = [
},
visibility: {
current_market: 'commodities',
hide_in: 'etfs',
},
},
]
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const OtherMarketsSlider = ({
config: {
current_market: (market_page) => market_page !== current_market,
is_eu: (item_is_eu) => item_is_eu === undefined || is_eu === item_is_eu,
hide_in: (market_page) => market_page === undefined || market_page !== current_market,
},
})
const is_no_linkAvailable = !!available_markets?.length
Expand Down

0 comments on commit 0e47b1d

Please sign in to comment.