fix: replace FlashList with FlatList to fix black screen in ScrollView
FlashList cannot be nested inside ScrollView. Changed to FlatList with scrollEnabled=false to allow proper rendering within the parent ScrollView. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
a8b5ee5256
commit
57b92ac52f
|
|
@ -1,4 +1,4 @@
|
|||
import { FlashList } from '@shopify/flash-list';
|
||||
import { FlatList } from 'react-native';
|
||||
import { Image } from 'expo-image';
|
||||
import { LinearGradient } from 'expo-linear-gradient';
|
||||
import { useLocalSearchParams, useRouter } from 'expo-router';
|
||||
|
|
@ -376,7 +376,7 @@ export default function HomeScreen() {
|
|||
setGridWidth(width)
|
||||
}}
|
||||
>
|
||||
<FlashList
|
||||
<FlatList
|
||||
data={displayCardData}
|
||||
renderItem={({ item, index }) => (
|
||||
<Card
|
||||
|
|
@ -393,9 +393,8 @@ export default function HomeScreen() {
|
|||
)}
|
||||
keyExtractor={(item) => item.id!}
|
||||
numColumns={numColumns}
|
||||
estimatedItemSize={cardWidth * 1.5}
|
||||
showsVerticalScrollIndicator={false}
|
||||
scrollEventThrottle={Platform.OS === 'ios' ? 16 : 50}
|
||||
scrollEnabled={false}
|
||||
/>
|
||||
</View>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Reference in New Issue