Add forgot username/password links and register link to login page & fix something on reset password. Will add those pages too.

This commit is contained in:
2026-02-01 15:36:09 -07:00
parent 7a5ca29a7d
commit 6dd01b2d7f
2 changed files with 79 additions and 57 deletions

View File

@@ -6,6 +6,7 @@ import { Suspense, useEffect, useState } from 'react'
import { HomeButton } from '@/app/components/HomeButton' import { HomeButton } from '@/app/components/HomeButton'
import { DiscordButton } from '@/app/components/DiscordButton' import { DiscordButton } from '@/app/components/DiscordButton'
import axios from 'axios' import axios from 'axios'
import Link from 'next/link'
function LoginForm ({ redirect }: { redirect: string | null }) { function LoginForm ({ redirect }: { redirect: string | null }) {
const [loading, setLoading] = useState<boolean>(true) const [loading, setLoading] = useState<boolean>(true)
@@ -31,6 +32,7 @@ function LoginForm ({ redirect }: { redirect: string | null }) {
{loading ? 'Loading...' : 'Lncvrt Games Login'} {loading ? 'Loading...' : 'Lncvrt Games Login'}
</p> </p>
{!loading && ( {!loading && (
<>
<form <form
className='flex flex-col gap-2' className='flex flex-col gap-2'
onSubmit={async e => { onSubmit={async e => {
@@ -90,6 +92,26 @@ function LoginForm ({ redirect }: { redirect: string | null }) {
/> />
<button type='submit'>Login</button> <button type='submit'>Login</button>
</form> </form>
<div className='flex justify-center flex-col gap-2 mt-6 text-center'>
<Link
href='/account/forgot-username'
draggable={false}
className='button'
>
Forgot username?
</Link>
<Link
href='/account/forgot-password'
draggable={false}
className='button'
>
Forgot password?
</Link>
<Link href='/account/register' draggable={false} className='button'>
Don&apos;t have an account?
</Link>
</div>
</>
)} )}
</div> </div>
) )

View File

@@ -110,7 +110,7 @@ function ResetPasswordForm ({ codeParam }: { codeParam: string }) {
)} )}
{result == 2 && ( {result == 2 && (
<div className='flex justify-center mt-6'> <div className='flex justify-center mt-6'>
<button className='button'>Login</button> <button>Login</button>
</div> </div>
)} )}
</div> </div>