Skip to content

Commit

Permalink
farhan: chore: change keys to more unique key (binary-com#10095)
Browse files Browse the repository at this point in the history
  • Loading branch information
farhan-nurzi-deriv committed Sep 15, 2023
1 parent 11a3047 commit 431ec89
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const OptionsAndMultipliersListing = () => {
</section>
<div className='wallets-options-and-multipliers-listing__content'>
{options_and_multipliers.map(account => (
<TradingAccountCard {...account} key={account.title} />
<TradingAccountCard {...account} key={`trading-account-card-${account.title}`} />
))}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const ProgressBar: React.FC<TProps> = ({ is_transition = 'true', active_index, i
const bar_classname = is_active ? 'wallets-progress-bar-active' : 'wallets-progress-bar-inactive';
return (
<div
key={`progress-bar__${idx}`}
key={`progress-bar-${idx}`}
onClick={() => setActiveIndex(idx)}
className={`${bar_classname} ${is_transition ? 'wallets-progress-bar-transition' : ''}`}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ const WalletListCardIActions: React.FC<TProps> = ({ account }) => {
return (
<div className='wallets-header__actions'>
{getWalletHeaderButtons(!!account?.is_virtual).map(button => (
<button key={button.name} className='wallets-header__button' onClick={button.action}>
<button
key={`wallets-header-button-${button.name}`}
className='wallets-header__button'
onClick={button.action}
>
{button.icon}
</button>
))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const WalletsAccordionContainer: React.FC<TProps> = ({ wallets_list }) => {
{wallets_list.map(account => {
return (
<WalletsAccordion
key={account.loginid}
key={`wallets-accordion-${account.loginid}`}
active_account={active_account}
account_info={account}
switchAccount={swithAccount}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const WalletsCarouselContent: React.FC = () => {
<div className='wallets-carousel-content' ref={wallet_embla_ref}>
<div className='wallets-carousel-content__container'>
{wallet_accounts_list.map(wallet => (
<WalletCard key={`wallet-card_${wallet.loginid}`} account={wallet} />
<WalletCard key={`wallet-card-${wallet.loginid}`} account={wallet} />
))}
</div>
<div className='wallets-carousel-content__progress-bar'>
Expand Down

0 comments on commit 431ec89

Please sign in to comment.