From 50aa3b741e48e4684fce6fd5e779c94bad28ba61 Mon Sep 17 00:00:00 2001 From: Nikolay Bonev Date: Mon, 18 Nov 2024 18:27:30 +0200 Subject: [PATCH] fixed type errors --- app/components/user/change-email.tsx | 3 ++- app/routes/_layout+/account-details.general.tsx | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/components/user/change-email.tsx b/app/components/user/change-email.tsx index 88042e764..f656bd9d0 100644 --- a/app/components/user/change-email.tsx +++ b/app/components/user/change-email.tsx @@ -73,7 +73,8 @@ export const ChangeEmailForm = ({ currentEmail }: { currentEmail: string }) => { if ("awaitingOtp" in actionData && actionData.awaitingOtp) { setFormState({ isAwaitingOtp: true, - newEmail: "newEmail" in actionData ? actionData.newEmail : null, + newEmail: + "newEmail" in actionData ? (actionData.newEmail as string) : null, }); } diff --git a/app/routes/_layout+/account-details.general.tsx b/app/routes/_layout+/account-details.general.tsx index 29b3b5bba..4537c3d41 100644 --- a/app/routes/_layout+/account-details.general.tsx +++ b/app/routes/_layout+/account-details.general.tsx @@ -251,6 +251,7 @@ export async function action({ context, request }: ActionFunctionArgs) { data({ awaitingOtp: true, newEmail, // We'll need this to show which email we're waiting for verification + success: true, }) ); }