Skip to content

Commit

Permalink
Merge pull request #30434 from software-mansion-labs/form-migration/K…
Browse files Browse the repository at this point in the history
…nowATeacherPage

[Form Provider Refactor] KnowATeacherPage
  • Loading branch information
luacmartins authored Nov 6, 2023
2 parents b040a90 + d459e17 commit bd509c3
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/pages/TeachersUnite/KnowATeacherPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import React, {useCallback} from 'react';
import {View} from 'react-native';
import {withOnyx} from 'react-native-onyx';
import _ from 'underscore';
import Form from '@components/Form';
import FormProvider from '@components/Form/FormProvider';
import InputWrapper from '@components/Form/InputWrapper';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import ScreenWrapper from '@components/ScreenWrapper';
import Text from '@components/Text';
Expand Down Expand Up @@ -99,7 +100,7 @@ function KnowATeacherPage(props) {
title={translate('teachersUnitePage.iKnowATeacher')}
onBackButtonPress={() => Navigation.goBack(ROUTES.TEACHERS_UNITE)}
/>
<Form
<FormProvider
enabledWhenOffline
style={[styles.flexGrow1, styles.ph5]}
formID={ONYXKEYS.FORMS.I_KNOW_A_TEACHER_FORM}
Expand All @@ -109,7 +110,8 @@ function KnowATeacherPage(props) {
>
<Text style={[styles.mb6]}>{translate('teachersUnitePage.getInTouch')}</Text>
<View>
<TextInput
<InputWrapper
InputComponent={TextInput}
inputID="firstName"
name="fname"
label={translate('common.firstName')}
Expand All @@ -120,7 +122,8 @@ function KnowATeacherPage(props) {
/>
</View>
<View style={styles.mv4}>
<TextInput
<InputWrapper
InputComponent={TextInput}
inputID="lastName"
name="lname"
label={translate('common.lastName')}
Expand All @@ -131,7 +134,8 @@ function KnowATeacherPage(props) {
/>
</View>
<View>
<TextInput
<InputWrapper
InputComponent={TextInput}
inputID="partnerUserID"
name="partnerUserID"
label={`${translate('common.email')}/${translate('common.phoneNumber')}`}
Expand All @@ -141,7 +145,7 @@ function KnowATeacherPage(props) {
autoCapitalize="none"
/>
</View>
</Form>
</FormProvider>
</ScreenWrapper>
);
}
Expand Down

0 comments on commit bd509c3

Please sign in to comment.