diff --git a/src/pages/settings/Subscription/SubscriptionSize/substeps/Size.tsx b/src/pages/settings/Subscription/SubscriptionSize/substeps/Size.tsx index cdcc65197cbd..8420c8ecfeaa 100644 --- a/src/pages/settings/Subscription/SubscriptionSize/substeps/Size.tsx +++ b/src/pages/settings/Subscription/SubscriptionSize/substeps/Size.tsx @@ -6,6 +6,7 @@ import Text from '@components/Text'; import TextInput from '@components/TextInput'; import useAutoFocusInput from '@hooks/useAutoFocusInput'; import useLocalize from '@hooks/useLocalize'; +import useStepFormSubmit from '@hooks/useStepFormSubmit'; import type {SubStepProps} from '@hooks/useSubStep/types'; import useThemeStyles from '@hooks/useThemeStyles'; import {validate} from '@pages/settings/Subscription/SubscriptionSize/utils'; @@ -20,6 +21,13 @@ function Size({onNext}: SizeProps) { const styles = useThemeStyles(); const {inputCallbackRef} = useAutoFocusInput(); + const handleSubmit = useStepFormSubmit({ + formId: ONYXKEYS.FORMS.SUBSCRIPTION_SIZE_FORM, + fieldIds: [INPUT_IDS.SUBSCRIPTION_SIZE], + onNext, + shouldSaveDraft: true, + }); + const defaultValues = { // TODO this is temporary and default value will be replaced in next phase once data in ONYX is ready [INPUT_IDS.SUBSCRIPTION_SIZE]: '', @@ -29,7 +37,7 @@ function Size({onNext}: SizeProps) {