Skip to content

Commit edda6a1

Browse files
committed
quickfix layout in home
1 parent b441c43 commit edda6a1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

components/horizontal-list.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useState, useEffect, useRef } from 'react';
2-
import { View, Text, FlatList, Pressable, StyleSheet, ActivityIndicator } from 'react-native';
2+
import { View, Text, FlatList, Pressable, StyleSheet, ActivityIndicator, Platform } from 'react-native';
33
import { fetchLatest } from '~/backend/database-functions';
44
import { useRouter } from 'expo-router';
55
import { ContentCard } from './content-card';
@@ -57,7 +57,6 @@ export function ContentHorizontalList({ title, type }: ContentHorizontalListProp
5757

5858
const viewabilityConfig = useRef({ itemVisiblePercentThreshold: 50 }).current;
5959

60-
6160
return (
6261
<View className='md:max-w-5xl mt-4 md:mt-40' style={{ flex: 1, alignSelf: 'center' }}>
6362
<View style={styles.container}>
@@ -100,6 +99,9 @@ export function ContentHorizontalList({ title, type }: ContentHorizontalListProp
10099
onViewableItemsChanged={onViewableItemsChanged}
101100
viewabilityConfig={viewabilityConfig}
102101
scrollEventThrottle={200}
102+
nestedScrollEnabled={true}
103+
removeClippedSubviews={Platform.OS === 'web' ? false : true}
104+
style={Platform.OS === 'web' ? { overflow: 'scroll' } : undefined}
103105
/>
104106
)}
105107
</View>
@@ -112,6 +114,9 @@ const styles = StyleSheet.create({
112114
flex: 1,
113115
marginVertical: 34,
114116
height: 320,
117+
...(Platform.OS === 'web' && {
118+
overflow: 'visible',
119+
}),
115120
},
116121
header: {
117122
flexDirection: 'row',

0 commit comments

Comments
 (0)