Make this how it should be

This commit is contained in:
2026-01-30 20:58:24 -07:00
parent d81e109e1f
commit fd5f07fd2c

View File

@@ -24,7 +24,7 @@ function ResetPasswordForm ({ codeParam }: { codeParam: string }) {
? 'Verify you are human to reset your password' ? 'Verify you are human to reset your password'
: 'Lncvrt Games password reset'} : 'Lncvrt Games password reset'}
</p> </p>
{result == -1 && ( {result == -1 ? (
<Turnstile <Turnstile
siteKey={process.env.NEXT_PUBLIC_TURNSTILE_SITE_KEY ?? ''} siteKey={process.env.NEXT_PUBLIC_TURNSTILE_SITE_KEY ?? ''}
onSuccess={async token => { onSuccess={async token => {
@@ -34,15 +34,7 @@ function ResetPasswordForm ({ codeParam }: { codeParam: string }) {
onError={() => setResult(1)} onError={() => setResult(1)}
className='flex justify-center' className='flex justify-center'
/> />
)} ) : result == 0 ? (
{(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 && (
<form <form
className='flex flex-col gap-2' className='flex flex-col gap-2'
onSubmit={async e => { onSubmit={async e => {
@@ -105,6 +97,14 @@ function ResetPasswordForm ({ codeParam }: { codeParam: string }) {
/> />
<button type='submit'>Update password</button> <button type='submit'>Update password</button>
</form> </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> </div>
) )