Rename functions here
This commit is contained in:
@@ -8,7 +8,7 @@ import { DiscordButton } from '@/app/components/DiscordButton'
|
|||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
|
|
||||||
function LoginForm ({ redirect }: { redirect: string | null }) {
|
function AccountLoginForm ({ redirect }: { redirect: string | null }) {
|
||||||
const [loading, setLoading] = useState<boolean>(true)
|
const [loading, setLoading] = useState<boolean>(true)
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
@@ -122,19 +122,19 @@ function LoginForm ({ redirect }: { redirect: string | null }) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function LoginPage () {
|
export default function AccountLoginPage () {
|
||||||
return (
|
return (
|
||||||
<Suspense
|
<Suspense
|
||||||
fallback={<p className='px-8 -mt-2 -mb-2 text-center'>Loading...</p>}
|
fallback={<p className='px-8 -mt-2 -mb-2 text-center'>Loading...</p>}
|
||||||
>
|
>
|
||||||
<LoginPageWithParams />
|
<AccountLoginPageWithParams />
|
||||||
</Suspense>
|
</Suspense>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
function LoginPageWithParams () {
|
function AccountLoginPageWithParams () {
|
||||||
const params = useSearchParams()
|
const params = useSearchParams()
|
||||||
const redirect = params.get('redirect')
|
const redirect = params.get('redirect')
|
||||||
|
|
||||||
return <LoginForm redirect={redirect} />
|
return <AccountLoginForm redirect={redirect} />
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { getCookie } from '@/util/cookie'
|
|||||||
import { useEffect, useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
import { useRouter } from 'next/navigation'
|
import { useRouter } from 'next/navigation'
|
||||||
|
|
||||||
export default function AccountLoginPage () {
|
export default function AccountPage () {
|
||||||
const [loading, setLoading] = useState<boolean>(true)
|
const [loading, setLoading] = useState<boolean>(true)
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { Suspense, useEffect, useState } from 'react'
|
|||||||
import { useRouter, useSearchParams } from 'next/navigation'
|
import { useRouter, useSearchParams } from 'next/navigation'
|
||||||
import { getCookie } from '@/util/cookie'
|
import { getCookie } from '@/util/cookie'
|
||||||
|
|
||||||
function ResetPasswordForm ({ codeParam }: { codeParam: string }) {
|
function AccountResetPasswordForm ({ codeParam }: { codeParam: string }) {
|
||||||
const [loading, setLoading] = useState<boolean>(true)
|
const [loading, setLoading] = useState<boolean>(true)
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
@@ -128,17 +128,17 @@ function ResetPasswordForm ({ codeParam }: { codeParam: string }) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ResetPasswordPage () {
|
export default function AccountResetPasswordPage () {
|
||||||
return (
|
return (
|
||||||
<Suspense
|
<Suspense
|
||||||
fallback={<p className='px-8 -mt-2 -mb-2 text-center'>Loading...</p>}
|
fallback={<p className='px-8 -mt-2 -mb-2 text-center'>Loading...</p>}
|
||||||
>
|
>
|
||||||
<ResetPasswordPageWithParams />
|
<AccountResetPasswordPageWithParams />
|
||||||
</Suspense>
|
</Suspense>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
function ResetPasswordPageWithParams () {
|
function AccountResetPasswordPageWithParams () {
|
||||||
const params = useSearchParams()
|
const params = useSearchParams()
|
||||||
const code = params.get('code')
|
const code = params.get('code')
|
||||||
|
|
||||||
@@ -151,5 +151,5 @@ function ResetPasswordPageWithParams () {
|
|||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
||||||
return <ResetPasswordForm codeParam={code} />
|
return <AccountResetPasswordForm codeParam={code} />
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user