multi_step_form.tsx 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. import { View, StyleSheet, ScrollView } from 'react-native';
  2. import { StatusBar } from 'expo-status-bar';
  3. import { useEffect } from 'react';
  4. import useSignUpStore from '../../providers/signup_form_store';
  5. import Form from '../registrationMultiStepForm/formComponent/form';
  6. import { SafeAreaView } from 'react-native-safe-area-context';
  7. const MultiStepForm: React.FC = () => {
  8. const { signUpFormData } = useSignUpStore();
  9. // logging to check if parent component can successfully receive user input in the multi-step form
  10. useEffect(() => {
  11. console.log('Current Zustand Store:', signUpFormData);
  12. }, [signUpFormData]);
  13. return (
  14. <SafeAreaView className="flex-1 bg-white" edges={['top', 'left', 'right']}>
  15. <ScrollView className="flex-1" showsVerticalScrollIndicator={false}>
  16. <View style={styles.container}>
  17. <Form />
  18. <StatusBar style="auto" />
  19. </View>
  20. </ScrollView>
  21. </SafeAreaView>
  22. );
  23. };
  24. const styles = StyleSheet.create({
  25. container: {
  26. flex: 1,
  27. backgroundColor: '#FFFFFF'
  28. }
  29. });
  30. export default MultiStepForm;