From 7c6cc346bb27dd011f438c79f1e137e72a9722aa Mon Sep 17 00:00:00 2001 From: Marcos Rodriguez Velez Date: Mon, 27 Mar 2023 00:07:46 -0400 Subject: [PATCH] REF: Fix virtualizedlist error --- components/WalletsCarousel.js | 15 ++++++++++- screen/wallets/drawerList.js | 49 +++++++++++++++-------------------- 2 files changed, 35 insertions(+), 29 deletions(-) diff --git a/components/WalletsCarousel.js b/components/WalletsCarousel.js index 13eeb7649..187e44404 100644 --- a/components/WalletsCarousel.js +++ b/components/WalletsCarousel.js @@ -311,7 +311,7 @@ const WalletsCarousel = forwardRef((props, ref) => { const { width } = useWindowDimensions(); const sliderHeight = 195; const itemWidth = width * 0.82 > 375 ? 375 : width * 0.82; - return ( + return isHandset ? ( { onScrollToIndexFailed={onScrollToIndexFailed} {...props} /> + ) : ( + + {props.data.map((item, index) => ( + + ))} + ); }); diff --git a/screen/wallets/drawerList.js b/screen/wallets/drawerList.js index 60bf8bddb..4860745a3 100644 --- a/screen/wallets/drawerList.js +++ b/screen/wallets/drawerList.js @@ -1,5 +1,5 @@ import React, { useContext, useEffect, useRef } from 'react'; -import { StatusBar, View, StyleSheet } from 'react-native'; +import { StatusBar, StyleSheet } from 'react-native'; import { DrawerContentScrollView } from '@react-navigation/drawer'; import ReactNativeHapticFeedback from 'react-native-haptic-feedback'; import PropTypes from 'prop-types'; @@ -56,34 +56,27 @@ const DrawerList = props => { return props.navigation.navigate('AddWalletRoot'); }; - const ListHeaderComponent = () => { - return ( - <> - - - ); - }; - - const renderWalletsCarousel = ( - - ); - return ( - - - - {renderWalletsCarousel} - + + + + ); };