94 - functionnal screens

This commit is contained in:
danis
2023-01-25 17:37:10 +03:00
committed by Clément Le Bihan
parent 47629e3938
commit 1fa43555df
3 changed files with 102 additions and 51 deletions
+17 -17
View File
@@ -89,23 +89,23 @@ const ChangeEmailForm = ({ onSubmit }: ChangeEmailFormProps) => {
<Button
style={{ marginTop: 10 }}
// isLoading={submittingForm}
// isDisabled={
// formData.newEmail.error !== null
// }
// onPress={async () => {
// setSubmittingForm(true);
// try {
// const resp = await onSubmit(
// formData.newEmail.value
// );
// toast.show({ description: resp });
// } catch (e) {
// toast.show({ description: e as string });
// } finally {
// setSubmittingForm(false);
// }
// }}
isLoading={submittingForm}
isDisabled={
formData.newEmail.error !== null
}
onPress={async () => {
setSubmittingForm(true);
try {
const resp = await onSubmit(formData.oldEmail.value,
formData.newEmail.value
);
toast.show({ description: resp });
} catch (e) {
toast.show({ description: e as string });
} finally {
setSubmittingForm(false);
}
}}
>
{translate("submitBtn")}
</Button>