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:
imeepos 2026-01-21 15:24:52 +08:00
parent a8b5ee5256
commit 57b92ac52f
1 changed files with 3 additions and 4 deletions

View File

@ -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>
)}