import { router } from "expo-router"; import { useRef, useState } from "react"; import { Image, Text, TouchableOpacity, View } from "react-native"; import { SafeAreaView } from "react-native-safe-area-context"; import Swiper from "react-native-swiper"; import { CustomButton } from "@/components/custom-button"; import { onboarding } from "@/constants"; const Welcome = () => { const swiperRef = useRef(null); const [activeIndex, setActiveIndex] = useState(0); const isLastSlide = activeIndex === onboarding.length - 1; return ( router.push("/(auth)/sign-up")} className="w-full flex justify-end items-end p-5" > Skip } activeDot={} index={activeIndex} onIndexChanged={setActiveIndex} > {onboarding.map((item) => ( {`Onboarding {item.title} {item.description} ))} isLastSlide ? router.push("/(auth)/sign-up") : swiperRef.current?.scrollBy(1) } title={isLastSlide ? "Get Started" : "Next"} className="w-11/12 mt-10" /> ); }; export default Welcome;