Skip to content

Commit

Permalink
Fix Android scrolling issue
Browse files Browse the repository at this point in the history
  • Loading branch information
TenType committed Oct 21, 2024
1 parent bdb8897 commit 5651d50
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/components/CarouselSection.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Dimensions, StyleSheet, View } from "react-native";
import AnimatedDotsCarousel from "react-native-animated-dots-carousel";
import Carousel from "react-native-reanimated-carousel";

import { GestureHandlerRootView } from "react-native-gesture-handler";
import { formatDate } from "../utils";
import Heading from "./Heading";
import RefreshButton from "./RefreshButton";
Expand Down Expand Up @@ -45,13 +46,15 @@ export default function CarouselSection({ navigation, data, onRefresh }) {
<Heading>Volunteer Opportunities</Heading>
<RefreshButton onRefresh={onRefresh} />
</View>
<Carousel
width={Dimensions.get("window").width - 20}
height={280}
data={data}
renderItem={renderItem}
onSnapToItem={(index) => setDotIndex(index)}
/>
<GestureHandlerRootView>
<Carousel
width={Dimensions.get("window").width - 20}
height={280}
data={data}
renderItem={renderItem}
onSnapToItem={(index) => setDotIndex(index)}
/>
</GestureHandlerRootView>
<View style={styles.container}>
<AnimatedDotsCarousel
length={data.length}
Expand Down

0 comments on commit 5651d50

Please sign in to comment.