Merged in feat/LOY-116-remove-cta-from-signup-verify-page (pull request #1335)
refactor(LOY-116): consolidate signup auth & remove SignUpVerification component * refactor(LOY-116): simplify signup authentication and remove SignUpVerification component - Remove SignUpVerification component and its related files - Move authentication checks to page-level components - Consolidate signup flow authentication logic - Remove unused signup verification link variant * refactor(LOY-116): remove "sign up verification" from TrackingPosition type Approved-by: Christian Andolf
This commit is contained in:
@@ -1,21 +1,9 @@
|
||||
import { redirect } from "next/navigation"
|
||||
|
||||
import { overview } from "@/constants/routes/myPages"
|
||||
|
||||
import { auth } from "@/auth"
|
||||
import SignupForm from "@/components/Forms/Signup"
|
||||
import { getLang } from "@/i18n/serverContext"
|
||||
import { isValidSession } from "@/utils/session"
|
||||
|
||||
import type { SignupFormWrapperProps } from "@/types/components/blocks/dynamicContent"
|
||||
|
||||
export default async function SignupFormWrapper({
|
||||
dynamic_content,
|
||||
}: SignupFormWrapperProps) {
|
||||
const session = await auth()
|
||||
if (isValidSession(session)) {
|
||||
// We don't want to allow users to access signup if they are already authenticated.
|
||||
redirect(overview[getLang()])
|
||||
}
|
||||
return <SignupForm {...dynamic_content} />
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user