import { TextContainer, WrapperContainer } from "@components/atoms"; import fontFamily from "@constants/fontFamily"; import type { AuthStackParamList } from "@navigations/AuthStack"; import type { NavigationProp } from "@react-navigation/native"; import { useNavigation } from "@react-navigation/native"; import { height, moderateScale, scale, verticalScale, width } from "@utils/scaling"; import React, { useRef, useState } from "react"; import { Image, NativeScrollEvent, NativeSyntheticEvent, ScrollView, View } from "react-native"; import { useStyles } from "react-native-unistyles"; import stylesheet from "./styles"; const onBoardData = [{ id: 1 }, { id: 2 }, { id: 3 }]; const Onboarding = (): React.JSX.Element => { const navigation = useNavigation>(); const [index, setIndex] = useState(0); const { styles } = useStyles(stylesheet); const scrollRef = useRef(null); const handleScroll = (event: NativeSyntheticEvent) => { const newIndex = Number((event.nativeEvent.contentOffset.x / (width - 20)).toFixed(0)); setIndex(newIndex); }; return ( {onBoardData.map((val) => ( ))} {onBoardData.map((val, i) => ( ))} navigation.navigate("Login")} /> ); }; export default Onboarding;