From a0f48f55a982a3c68271e8920be1c893a93ea85e Mon Sep 17 00:00:00 2001 From: secondl1ght Date: Thu, 4 Jul 2024 14:39:27 -0600 Subject: [PATCH] fix: broken util import --- src/components/LoginForm.tsx | 5 +---- src/components/button/VaultButton.tsx | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/components/LoginForm.tsx b/src/components/LoginForm.tsx index 1278d6e0..7aa71ee7 100644 --- a/src/components/LoginForm.tsx +++ b/src/components/LoginForm.tsx @@ -20,7 +20,6 @@ import { Input } from '@/components/ui/input'; import { useLoginMutation } from '@/graphql/mutations/__generated__/login.generated'; import { argon2Hash } from '@/utils/crypto'; import { handleApolloError } from '@/utils/error'; -import { MIN_PASSWORD_LENGTH } from '@/utils/password'; import { ROUTES } from '@/utils/routes'; import { @@ -36,9 +35,7 @@ const FormSchema = z.object({ email: z.string().email().min(5, { message: 'Invalid email.', }), - password: z.string().min(MIN_PASSWORD_LENGTH, { - message: `The password is at least ${MIN_PASSWORD_LENGTH} characters.`, - }), + password: z.string(), }); export function LoginForm() { diff --git a/src/components/button/VaultButton.tsx b/src/components/button/VaultButton.tsx index 667a2e3f..e7a3e773 100644 --- a/src/components/button/VaultButton.tsx +++ b/src/components/button/VaultButton.tsx @@ -11,7 +11,6 @@ import { useUserQuery } from '@/graphql/queries/__generated__/user.generated'; import { cn } from '@/lib/utils'; import { useKeyStore } from '@/stores/keys'; import { handleApolloError } from '@/utils/error'; -import { MIN_PASSWORD_LENGTH } from '@/utils/password'; import { WorkerMessage, WorkerResponse } from '@/workers/account/types'; import { Button } from '../ui/button'; @@ -37,9 +36,7 @@ import { Input } from '../ui/input'; import { useToast } from '../ui/use-toast'; const formSchema = z.object({ - password: z.string().min(MIN_PASSWORD_LENGTH, { - message: `Password needs to be at least ${MIN_PASSWORD_LENGTH} characters.`, - }), + password: z.string(), }); const UnlockDialogContent: FC<{ callback: () => void }> = ({ callback }) => {