FIX: Background color for TotalBalanceVIew

This commit is contained in:
Marcos Rodriguez Velez 2024-08-25 13:57:10 -04:00
parent e2e77a6744
commit d491d9d7a8
2 changed files with 12 additions and 4 deletions

View file

@ -1,7 +1,7 @@
import { DrawerContentScrollView } from '@react-navigation/drawer';
import { NavigationProp, ParamListBase, useIsFocused } from '@react-navigation/native';
import React, { memo, useCallback, useEffect, useMemo, useReducer, useRef } from 'react';
import { InteractionManager, LayoutAnimation, StyleSheet, ViewStyle } from 'react-native';
import { InteractionManager, LayoutAnimation, StyleSheet, View, ViewStyle } from 'react-native';
import triggerHapticFeedback, { HapticFeedbackTypes } from '../../blue_modules/hapticFeedback';
import { TWallet } from '../../class/wallets/types';
@ -146,7 +146,11 @@ const DrawerList: React.FC<DrawerListProps> = memo(({ navigation }) => {
showsVerticalScrollIndicator={false}
>
<Header leftText={loc.wallets.list_title} onNewWalletPress={onNewWalletPress} isDrawerList />
{isTotalBalanceEnabled && <TotalWalletsBalance />}
{isTotalBalanceEnabled && (
<View style={stylesHook.root}>
<TotalWalletsBalance />
</View>
)}
<WalletsCarousel
data={state.wallets}
extraData={[state.wallets]}

View file

@ -296,14 +296,18 @@ const WalletsList: React.FC = () => {
case WalletsListSections.TRANSACTIONS:
return renderListHeaderComponent();
case WalletsListSections.CAROUSEL: {
return !isLargeScreen && isTotalBalanceEnabled ? <TotalWalletsBalance /> : null;
return !isLargeScreen && isTotalBalanceEnabled ? (
<View style={stylesHook.walletsListWrapper}>
<TotalWalletsBalance />
</View>
) : null;
}
default:
return null;
}
},
[isLargeScreen, isTotalBalanceEnabled, renderListHeaderComponent],
[isLargeScreen, isTotalBalanceEnabled, renderListHeaderComponent, stylesHook.walletsListWrapper],
);
const renderSectionFooter = useCallback(