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 }