zdjęcia wyświetlają się poprawnie teraz na karcie produktu. Nie wychodzą poza swoje granice

This commit is contained in:
2025-06-09 10:09:28 +02:00
parent 5344acbdd1
commit 44f5239328

View File

@@ -166,19 +166,20 @@ export default function NoticeDetails() {
ref={flatListRef} ref={flatListRef}
data={images} data={images}
horizontal horizontal
snapToAlignment="center" snapToInterval={width}
snapToAlignment="start"
decelerationRate="fast" decelerationRate="fast"
showsHorizontalScrollIndicator={false} showsHorizontalScrollIndicator={false}
pagingEnabled pagingEnabled
onViewableItemsChanged={onViewableItemsChanged} onViewableItemsChanged={onViewableItemsChanged}
viewabilityConfig={viewabilityConfig} viewabilityConfig={viewabilityConfig}
renderItem={({item, index}) => ( renderItem={({item, index}) => (
<View style={{width: width}} className='p-2'> <View style={{width: width}} className="p-1">
<Image <Image
source={item} source={item}
className="h-auto w-auto rounded-md aspect-[1/1]" className="h-auto w-auto rounded-md aspect-[1/1]"
alt={`Zdjęcie ${index + 1}`} alt={`Zdjęcie ${index + 1}`}
resizeMode="contain" resizeMode="cover"
/> />
</View> </View>
)} )}