Make this how it should be
This commit is contained in:
@@ -24,7 +24,7 @@ function ResetPasswordForm ({ codeParam }: { codeParam: string }) {
|
||||
? 'Verify you are human to reset your password'
|
||||
: 'Lncvrt Games password reset'}
|
||||
</p>
|
||||
{result == -1 && (
|
||||
{result == -1 ? (
|
||||
<Turnstile
|
||||
siteKey={process.env.NEXT_PUBLIC_TURNSTILE_SITE_KEY ?? ''}
|
||||
onSuccess={async token => {
|
||||
@@ -34,15 +34,7 @@ function ResetPasswordForm ({ codeParam }: { codeParam: string }) {
|
||||
onError={() => setResult(1)}
|
||||
className='flex justify-center'
|
||||
/>
|
||||
)}
|
||||
{(result == 1 || result == 2) && (
|
||||
<p className='mt-2 -mb-2 text-center text-sm'>
|
||||
{result == 1
|
||||
? 'Unable to verify captcha, please reload page.'
|
||||
: 'Password reset sucessfully'}
|
||||
</p>
|
||||
)}
|
||||
{result == 0 && (
|
||||
) : result == 0 ? (
|
||||
<form
|
||||
className='flex flex-col gap-2'
|
||||
onSubmit={async e => {
|
||||
@@ -105,6 +97,14 @@ function ResetPasswordForm ({ codeParam }: { codeParam: string }) {
|
||||
/>
|
||||
<button type='submit'>Update password</button>
|
||||
</form>
|
||||
) : (
|
||||
(result == 1 || result == 2) && (
|
||||
<p className='mt-2 -mb-2 text-center text-sm'>
|
||||
{result == 1
|
||||
? 'Unable to verify captcha, please reload page.'
|
||||
: 'Password reset sucessfully'}
|
||||
</p>
|
||||
)
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user