diff --git a/src/renderer/pages/Staking/ui/NominatorItem.tsx b/src/renderer/pages/Staking/ui/NominatorItem.tsx index 3d9f4fe70..0ca229712 100644 --- a/src/renderer/pages/Staking/ui/NominatorItem.tsx +++ b/src/renderer/pages/Staking/ui/NominatorItem.tsx @@ -1,12 +1,12 @@ import { useUnit } from 'effector-react'; import { type ReactNode } from 'react'; -import { type Account, type Address, type Asset, type Chain } from '@/shared/core'; +import { type Address, type Asset, type Chain } from '@/shared/core'; import { useI18n } from '@/shared/i18n'; import { cnTw, nonNullable } from '@/shared/lib/utils'; -import { FootnoteText, Icon, Plate, Shimmering } from '@/shared/ui'; +import { FootnoteText, Icon, Plate } from '@/shared/ui'; import { AccountExplorers } from '@/shared/ui-entities'; -import { Checkbox } from '@/shared/ui-kit'; +import { Checkbox, Skeleton } from '@/shared/ui-kit'; import { AssetBalance } from '@/entities/asset'; import { AssetFiatBalance } from '@/entities/price'; import { walletModel, walletUtils } from '@/entities/wallet'; @@ -17,7 +17,7 @@ type Props = { asset?: Asset; chain: Chain; isStakingLoading: boolean; - stake: NominatorInfo; + stake: NominatorInfo; content: ReactNode; onToggleNominator: (nominator: Address, boolean: boolean) => void; onCheckValidators: (stash?: Address) => void; @@ -39,46 +39,44 @@ export const NominatorsItem = ({ const activeWallet = useUnit(walletModel.$activeWallet); return ( - + {activeWallet && !walletUtils.isWatchOnly(activeWallet) && nominatorsLength > 1 ? ( -
+
onToggleNominator(stake.address, checked)} - > -
{content}
-
+ /> +
{content}
) : (
{content}
)} -
- {!stake.totalStake || !asset ? ( - <> - - - - ) : ( - <> - - - - )} -
-
- {!stake.totalReward || !asset ? ( - <> - - - - ) : ( - <> - - - - )} -
+ + {!stake.totalStake || !asset ? ( +
+ + +
+ ) : ( +
+ + +
+ )} + + {!stake.totalReward || !asset ? ( +
+ + +
+ ) : ( +
+ + +
+ )} + {nonNullable(stake.stash) && (