import React, { FC } from 'react'; import { useNavigation } from '@react-navigation/native'; import { View, ScrollView } from 'react-native'; import { Button, Text, Icon } from 'react-native-elements'; import { styles } from './styles'; import { Props } from './types'; import { colors } from 'styles'; const StepByStepForm: FC = ({ pages, currentPage, defaultValues, finishRedirectRoute, }) => { const navigation = useNavigation(); const getButton = (i: number, route: string) => { if (i === 0 && currentPage !== 0) { return ; } let buttonLabel; if (i < currentPage) { buttonLabel = 'Ubah'; } else if (i === currentPage) { buttonLabel = 'Lanjut'; } return buttonLabel ? (