From d5ebb59401d24d56424d4f8d199c643e387c4512 Mon Sep 17 00:00:00 2001 From: zakher Date: Tue, 27 Aug 2024 22:09:41 +0300 Subject: [PATCH] fix: login type fields in login form [skip_storybook] --- apps/docs/CHANGELOG.md | 7 +++++++ apps/docs/package.json | 2 +- packages/components/CHANGELOG.md | 6 ++++++ packages/components/blocks/auth/LoginForm.tsx | 4 ++-- packages/components/package.json | 2 +- packages/storybook/CHANGELOG.md | 7 +++++++ packages/storybook/package.json | 2 +- 7 files changed, 25 insertions(+), 5 deletions(-) diff --git a/apps/docs/CHANGELOG.md b/apps/docs/CHANGELOG.md index 31a52857..045306a2 100644 --- a/apps/docs/CHANGELOG.md +++ b/apps/docs/CHANGELOG.md @@ -1,5 +1,12 @@ # hawa-docs +## 0.0.121 + +### Patch Changes + +- Updated dependencies + - @sikka/hawa@0.49.4 + ## 0.0.120 ### Patch Changes diff --git a/apps/docs/package.json b/apps/docs/package.json index 612c7957..08563104 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -1,6 +1,6 @@ { "name": "hawa-docs", - "version": "0.0.120", + "version": "0.0.121", "private": true, "scripts": { "dev": "next dev -p 3001", diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 78fc2d3b..660c9614 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -1,5 +1,11 @@ # @sikka/hawa +## 0.49.4 + +### Patch Changes + +- Display email field in `LoginForm` when logintype is `email_code` + ## 0.49.3 ### Patch Changes diff --git a/packages/components/blocks/auth/LoginForm.tsx b/packages/components/blocks/auth/LoginForm.tsx index b1cfaad6..d17864a8 100644 --- a/packages/components/blocks/auth/LoginForm.tsx +++ b/packages/components/blocks/auth/LoginForm.tsx @@ -156,7 +156,7 @@ export const LoginForm: FC = ({ { message: texts?.phone?.invalid || "Phone Number Invalid" }, ), }); - } else if (loginType === "email_link") { + } else if (loginType === "email_link" || loginType === "email_code") { formSchema = z.object({ email: z .string({ required_error: texts?.email?.required || "Email Required" }) @@ -323,7 +323,7 @@ export const LoginForm: FC = ({ /> ); - case "email_link": + case "email_link" || "email_code": return ( <>