Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Form Provider Refactor] ReportWelcomeMessagePage #32134

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/pages/ReportWelcomeMessagePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import React, {useCallback, useRef, useState} from 'react';
import {View} from 'react-native';
import {withOnyx} from 'react-native-onyx';
import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView';
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 @@ -86,7 +87,7 @@ function ReportWelcomeMessagePage(props) {
title={props.translate('welcomeMessagePage.welcomeMessage')}
onBackButtonPress={() => Navigation.goBack(ROUTES.REPORT_SETTINGS.getRoute(props.report.reportID))}
/>
<Form
<FormProvider
style={[styles.flexGrow1, styles.ph5]}
formID={ONYXKEYS.FORMS.WELCOME_MESSAGE_FORM}
onSubmit={submitForm}
Expand All @@ -95,7 +96,8 @@ function ReportWelcomeMessagePage(props) {
>
<Text style={[styles.mb5]}>{props.translate('welcomeMessagePage.explainerText')}</Text>
<View style={[styles.mb6]}>
<TextInput
<InputWrapper
InputComponent={TextInput}
inputID="welcomeMessage"
label={props.translate('welcomeMessagePage.welcomeMessage')}
accessibilityLabel={props.translate('welcomeMessagePage.welcomeMessage')}
Expand All @@ -116,7 +118,7 @@ function ReportWelcomeMessagePage(props) {
containerStyles={[styles.autoGrowHeightMultilineInput]}
/>
</View>
</Form>
</FormProvider>
</FullPageNotFoundView>
</ScreenWrapper>
);
Expand Down
Loading