feat(SW-360): Add signup verification route w. tracking for login
This commit is contained in:
committed by
Pontus Dreij
parent
0e0c09dfcd
commit
bf8976c24c
@@ -1,23 +0,0 @@
|
||||
import { redirect } from "next/navigation"
|
||||
|
||||
import { overview } from "@/constants/routes/myPages"
|
||||
|
||||
import { auth } from "@/auth"
|
||||
import { getLang } from "@/i18n/serverContext"
|
||||
|
||||
import Form from "../index"
|
||||
|
||||
import { RegisterFormProps } from "@/types/components/form/registerForm"
|
||||
|
||||
export default async function ServerRegisterForm({
|
||||
link,
|
||||
subtitle,
|
||||
title,
|
||||
}: RegisterFormProps) {
|
||||
const session = await auth()
|
||||
if (session) {
|
||||
// We don't want to allow users to signup if they are already authenticated.
|
||||
redirect(overview[getLang()])
|
||||
}
|
||||
return <Form link={link} subtitle={subtitle} title={title} />
|
||||
}
|
||||
Reference in New Issue
Block a user