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