finished reset password & other changes
This commit is contained in:
@@ -21,7 +21,8 @@ import FormError from '@/components/form-error'
|
||||
import FormSuccess from '@/components/form-success'
|
||||
import { login } from '@/actions/login'
|
||||
import { LoginSchema } from '@/schemas'
|
||||
import { AUTH_REGISTER_URL } from '@/config/routes'
|
||||
import { AUTH_REGISTER_URL, AUTH_RESET_PASSWORD_URL } from '@/config/routes'
|
||||
import Link from 'next/link'
|
||||
|
||||
export const LoginForm = () => {
|
||||
const t = useI18n()
|
||||
@@ -61,12 +62,12 @@ export const LoginForm = () => {
|
||||
backButtonLabel={t('auth.form.login.back_button_label')}
|
||||
backButtonHref={AUTH_REGISTER_URL}
|
||||
showSocial
|
||||
continueWithLabel={t('form.label.continue_with')}
|
||||
continueWithLabel={t('auth.form.label.continue_with')}
|
||||
>
|
||||
<Form {...form}>
|
||||
<form
|
||||
onSubmit={form.handleSubmit(onSubmit)}
|
||||
className="space-y-6"
|
||||
className="space-y-0"
|
||||
>
|
||||
<div className="space-y-4">
|
||||
<FormField control={form.control} name="email"
|
||||
@@ -78,7 +79,7 @@ export const LoginForm = () => {
|
||||
disabled={isPending}
|
||||
placeholder={t('form.placeholder.email')}
|
||||
type="email"
|
||||
autoComplete="username"
|
||||
autoComplete="email"
|
||||
/>
|
||||
</FormControl>
|
||||
<FormMessage className="text-xs"/>
|
||||
@@ -96,9 +97,14 @@ export const LoginForm = () => {
|
||||
autoComplete="current-password"
|
||||
/>
|
||||
</FormControl>
|
||||
<Button variant="link" size="sm" asChild
|
||||
className="mt-0 p-0 items-start font-light text-sky-900">
|
||||
<Link href={AUTH_RESET_PASSWORD_URL}>{t('auth.form.login.reset_password_link_text')}</Link>
|
||||
</Button>
|
||||
<FormMessage className="text-xs"/>
|
||||
</FormItem>)}/>
|
||||
</div>
|
||||
|
||||
<FormSuccess message={success}/>
|
||||
<FormError message={error || urlError}/>
|
||||
<Button type="submit" className="w-full" disabled={isPending}>
|
||||
@@ -107,6 +113,4 @@ export const LoginForm = () => {
|
||||
</form>
|
||||
</Form>
|
||||
</CardWrapper>)
|
||||
}
|
||||
|
||||
//1:30:00
|
||||
}
|
||||
Reference in New Issue
Block a user