Skip to content

Commit

Permalink
RAV-72 Allow login via username [#677]
Browse files Browse the repository at this point in the history
  • Loading branch information
prathameshkurunkar7 committed Feb 19, 2024
1 parent 486b9cc commit 6d9419b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions raven-app/src/pages/auth/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,22 @@ export const Component = () => {
{error && <ErrorCallout>
{error.message}
</ErrorCallout>}
{/* <ErrorBanner error={error} /> */}


<form onSubmit={handleSubmit(onSubmit)}>
<Flex direction='column' gap='6'>
<Flex direction='column' gap='4'>

<Flex direction='column' gap='2'>
<Label htmlFor='email' isRequired>Email address</Label>
<Label htmlFor='email' isRequired>Email / Username</Label>
<TextField.Root>
<TextField.Input {...register("email",
{
// validate: (email) => isEmailValid(email) || "Please enter a valid email address.",
required: "Email is required."
required: "Email or Username is required."
})}
name="email"
type="text"
// autoComplete="email"
required
placeholder="e.g. example@gmail.com"
placeholder="jane@example.com"
tabIndex={0} />
</TextField.Root>
{errors?.email && <ErrorText>{errors?.email?.message}</ErrorText>}
Expand Down

0 comments on commit 6d9419b

Please sign in to comment.