-
Notifications
You must be signed in to change notification settings - Fork 3.1k
/
Copy pathindex.tsx
46 lines (41 loc) · 1.81 KB
/
index.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import React from 'react';
import FeedbackSurvey from '@components/FeedbackSurvey';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import ScreenWrapper from '@components/ScreenWrapper';
import ScrollView from '@components/ScrollView';
import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
import Navigation from '@libs/Navigation/Navigation';
import * as Subscription from '@userActions/Subscription';
import type {FeedbackSurveyOptionID} from '@src/CONST';
function DisableAutoRenewSurveyPage() {
const {translate} = useLocalize();
const styles = useThemeStyles();
const handleSubmit = (key: FeedbackSurveyOptionID, additionalNote?: string) => {
Subscription.updateSubscriptionAutoRenew(false, key, additionalNote);
Navigation.goBack();
};
return (
<ScreenWrapper
testID={DisableAutoRenewSurveyPage.displayName}
includeSafeAreaPaddingBottom={false}
shouldEnablePickerAvoiding={false}
shouldEnableMaxHeight
>
<HeaderWithBackButton
title={translate('subscription.subscriptionSettings.disableAutoRenew')}
onBackButtonPress={Navigation.goBack}
/>
<ScrollView contentContainerStyle={[styles.flexGrow1, styles.pt3]}>
<FeedbackSurvey
title={translate('subscription.subscriptionSettings.helpUsImprove')}
description={translate('subscription.subscriptionSettings.whatsMainReason')}
onSubmit={handleSubmit}
optionRowStyles={styles.flex1}
/>
</ScrollView>
</ScreenWrapper>
);
}
DisableAutoRenewSurveyPage.displayName = 'DisableAutoRenewSurveyPage';
export default DisableAutoRenewSurveyPage;