diff --git a/components/Blocks/DynamicContent/SignUpVerification/index.tsx b/components/Blocks/DynamicContent/SignUpVerification/index.tsx index eea95205a..47712107f 100644 --- a/components/Blocks/DynamicContent/SignUpVerification/index.tsx +++ b/components/Blocks/DynamicContent/SignUpVerification/index.tsx @@ -1,5 +1,11 @@ +import { redirect } from "next/navigation" + +import { overview } from "@/constants/routes/myPages" + +import { auth } from "@/auth" import LoginButton from "@/components/Current/Header/LoginButton" import { getIntl } from "@/i18n" +import { getLang } from "@/i18n/serverContext" import styles from "./signUpVerification.module.css" @@ -9,6 +15,10 @@ export default async function SignUpVerification({ title, subtitle, }: SignUpVerificationProps) { + const session = await auth() + if (session) { + redirect(overview[getLang()]) + } const intl = await getIntl() return ( diff --git a/components/Blocks/DynamicContent/SignupFormWrapper/index.tsx b/components/Blocks/DynamicContent/SignupFormWrapper/index.tsx index 6b9ab9673..f48260970 100644 --- a/components/Blocks/DynamicContent/SignupFormWrapper/index.tsx +++ b/components/Blocks/DynamicContent/SignupFormWrapper/index.tsx @@ -15,7 +15,7 @@ export default async function SignupFormWrapper({ }) { const session = await auth() if (session) { - // We don't want to allow users to signup if they are already authenticated. + // We don't want to allow users to access signup if they are already authenticated. redirect(overview[getLang()]) } return
diff --git a/constants/routes/signup.ts b/constants/routes/signup.ts index 12eca8615..82a39ee41 100644 --- a/constants/routes/signup.ts +++ b/constants/routes/signup.ts @@ -17,5 +17,3 @@ export const signupVerify: LangRoute = { da: `${signup.da}/bekraeft`, de: `${signup.de}/verifizieren`, } - -// export const signup = [...Object.values(signupRoutes)] diff --git a/i18n/dictionaries/da.json b/i18n/dictionaries/da.json index cd2a0f089..6001f6fe4 100644 --- a/i18n/dictionaries/da.json +++ b/i18n/dictionaries/da.json @@ -23,7 +23,7 @@ "As our Close Friend": "Som vores nære ven", "At latest": "Senest", "At the hotel": "På hotellet", - "Attraction": "Attraktion", + "Attractions": "Attraktioner", "Back to scandichotels.com": "Tilbage til scandichotels.com", "Bar": "Bar", "Bed type": "Seng type",