multi_step_form.tsx 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  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
  15. className="flex-1 bg-white"
  16. edges={['top', 'left', 'right']}
  17. >
  18. <ScrollView className="flex-1" showsVerticalScrollIndicator={false}>
  19. <View style={styles.container}>
  20. <Form />
  21. <StatusBar style="auto" />
  22. </View>
  23. </ScrollView>
  24. </SafeAreaView>
  25. );
  26. };
  27. const styles = StyleSheet.create({
  28. container: {
  29. flex: 1,
  30. backgroundColor: '#FFFFFF'
  31. }
  32. });
  33. export default MultiStepForm;