feat: interact with user settings/profile (#9)
This commit is contained in:
@ -22,7 +22,10 @@ const ForgotPassword: NextPage<FooterProps> = (props) => {
|
||||
const { version } = props
|
||||
|
||||
const { fetchState, message, errors, getErrorTranslation, handleSubmit } =
|
||||
useForm({ validateSchemaObject: { email: userSchema.email } })
|
||||
useForm({
|
||||
validateSchema: { email: userSchema.email },
|
||||
resetOnSuccess: true
|
||||
})
|
||||
|
||||
const onSubmit: HandleSubmitCallback = async (formData) => {
|
||||
try {
|
||||
@ -55,10 +58,10 @@ const ForgotPassword: NextPage<FooterProps> = (props) => {
|
||||
<Main>
|
||||
<AuthenticationForm onSubmit={handleSubmit(onSubmit)}>
|
||||
<Input type='email' placeholder='Email' name='email' label='Email' />
|
||||
<Button data-cy='submit' className='w-full mt-6' type='submit'>
|
||||
<Button data-cy='submit' className='mt-6 w-full' type='submit'>
|
||||
{t('authentication:submit')}
|
||||
</Button>
|
||||
<p className='mt-3 font-headline text-sm text-green-800 dark:text-green-400 hover:underline'>
|
||||
<p className='mt-3 font-headline text-sm text-green-800 hover:underline dark:text-green-400'>
|
||||
<Link href='/authentication/signin'>
|
||||
<a>{t('authentication:already-know-password')}</a>
|
||||
</Link>
|
||||
|
@ -23,7 +23,10 @@ const ResetPassword: NextPage<FooterProps> = (props) => {
|
||||
const { version } = props
|
||||
|
||||
const { fetchState, message, errors, getErrorTranslation, handleSubmit } =
|
||||
useForm({ validateSchemaObject: { password: userSchema.password } })
|
||||
useForm({
|
||||
validateSchema: { password: userSchema.password },
|
||||
resetOnSuccess: true
|
||||
})
|
||||
|
||||
const onSubmit: HandleSubmitCallback = async (formData) => {
|
||||
try {
|
||||
@ -59,7 +62,7 @@ const ResetPassword: NextPage<FooterProps> = (props) => {
|
||||
name='password'
|
||||
label='Password'
|
||||
/>
|
||||
<Button data-cy='submit' className='w-full mt-6' type='submit'>
|
||||
<Button data-cy='submit' className='mt-6 w-full' type='submit'>
|
||||
{t('authentication:submit')}
|
||||
</Button>
|
||||
</AuthenticationForm>
|
||||
|
Reference in New Issue
Block a user