Skip to content

Commit 03e8926

Browse files
author
Rajat
committed
Fixed error message display
1 parent 90a003d commit 03e8926

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

apps/web/components/public/payments/login-form.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ export function LoginForm({ onLoginComplete }: LoginFormProps) {
7878
}
7979

8080
await requestCode(emailValue);
81-
82-
setLoginStep("otp");
8381
};
8482

8583
const requestCode = async function (email: string) {
@@ -92,8 +90,11 @@ export function LoginForm({ onLoginComplete }: LoginFormProps) {
9290
if (error) {
9391
toast({
9492
title: TOAST_TITLE_ERROR,
95-
description: error as any,
93+
description: error.message as any,
94+
variant: "destructive",
9695
});
96+
} else {
97+
setLoginStep("otp");
9798
}
9899
} finally {
99100
setLoading(false);

0 commit comments

Comments
 (0)