From f6891bda694cb9ba5fd8c1edce24245fe85287c1 Mon Sep 17 00:00:00 2001 From: Abdelrahman Khattab Date: Tue, 3 Sep 2024 00:42:54 +0200 Subject: [PATCH 1/2] Change address state to use value instead of default value --- src/components/AddressForm.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/AddressForm.tsx b/src/components/AddressForm.tsx index 7ca4cc3273ca..393cdd5559f8 100644 --- a/src/components/AddressForm.tsx +++ b/src/components/AddressForm.tsx @@ -1,5 +1,6 @@ import React, {useCallback} from 'react'; import {View} from 'react-native'; +import type {State} from '@components/StateSelector'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as ErrorUtils from '@libs/ErrorUtils'; @@ -192,7 +193,7 @@ function AddressForm({ From 8fe414c1ac4b7afaa34e3d6bdea97927c9e15b09 Mon Sep 17 00:00:00 2001 From: Abdelrahman Khattab Date: Tue, 3 Sep 2024 01:00:47 +0200 Subject: [PATCH 2/2] Minor edit --- src/components/AddressForm.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/AddressForm.tsx b/src/components/AddressForm.tsx index 393cdd5559f8..bd032df9a244 100644 --- a/src/components/AddressForm.tsx +++ b/src/components/AddressForm.tsx @@ -1,12 +1,11 @@ import React, {useCallback} from 'react'; import {View} from 'react-native'; -import type {State} from '@components/StateSelector'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as ErrorUtils from '@libs/ErrorUtils'; import * as ValidationUtils from '@libs/ValidationUtils'; -import CONST from '@src/CONST'; import type {Country} from '@src/CONST'; +import CONST from '@src/CONST'; import type ONYXKEYS from '@src/ONYXKEYS'; import INPUT_IDS from '@src/types/form/HomeAddressForm'; import type {Errors} from '@src/types/onyx/OnyxCommon'; @@ -15,6 +14,7 @@ import CountrySelector from './CountrySelector'; import FormProvider from './Form/FormProvider'; import InputWrapper from './Form/InputWrapper'; import type {FormOnyxValues} from './Form/types'; +import type {State} from './StateSelector'; import StateSelector from './StateSelector'; import TextInput from './TextInput';