diff --git a/src/screens/cars/AddCar.tsx b/src/screens/cars/AddCar.tsx index 056c2f9f7..c38cfa903 100644 --- a/src/screens/cars/AddCar.tsx +++ b/src/screens/cars/AddCar.tsx @@ -152,7 +152,7 @@ export default class AddCar extends BaseScreen { autoCapitalize={'none'} autoCorrect={false} label={`${Constants.VIN}*`} - errorMessage={!this.checkVIN() && vin && I18n.t('cars.invalidVIN')} + errorMessage={!this.checkVIN() ? vin && I18n.t('cars.invalidVIN'): null} errorStyle={style.errorText} inputStyle={style.selectDropdownRowText} onChangeText={(newVin: string) => this.setState({ vin: newVin })} @@ -166,7 +166,7 @@ export default class AddCar extends BaseScreen { autoCapitalize={'none'} autoCorrect={false} errorStyle={style.errorText} - errorMessage={!this.checkLicensePlate() && licensePlate && I18n.t('cars.invalidLicensePlate')} + errorMessage={!this.checkLicensePlate() ? licensePlate && I18n.t('cars.invalidLicensePlate') : null} inputStyle={style.selectDropdownRowText} onChangeText={(newLicensePlate: string) => this.setState({ licensePlate: newLicensePlate })} /> @@ -378,9 +378,9 @@ export default class AddCar extends BaseScreen { return; } } catch (error) { - switch (error?.status) { + switch (error?.response?.status) { case HTTPError.CAR_ALREADY_EXIST_ERROR: - Message.showError(I18n.t('users.carAlreadyExistError')); + Message.showError(I18n.t('cars.carAlreadyExistError')); break; case HTTPError.USER_ALREADY_ASSIGNED_TO_CAR: Message.showError(I18n.t('cars.userAlreadyAssignedError')); diff --git a/src/screens/payment-methods/stripe/StripePaymentMethodCreationForm.tsx b/src/screens/payment-methods/stripe/StripePaymentMethodCreationForm.tsx index 91d8f32d2..bbdcd9b52 100644 --- a/src/screens/payment-methods/stripe/StripePaymentMethodCreationForm.tsx +++ b/src/screens/payment-methods/stripe/StripePaymentMethodCreationForm.tsx @@ -1,4 +1,3 @@ -import { DrawerActions } from '@react-navigation/native'; import { CardField, CardFieldInput, initStripe, useConfirmSetupIntent } from '@stripe/stripe-react-native'; import I18n from 'i18n-js'; import { Button, CheckBox, Spinner, View } from 'native-base';