fix(SW-360): signup form props
This commit is contained in:
committed by
Pontus Dreij
parent
cfeb97771e
commit
a9033af4bd
@@ -12,8 +12,7 @@ import styles from "./signUpVerification.module.css"
|
||||
import type { SignUpVerificationProps } from "@/types/components/blocks/dynamicContent"
|
||||
|
||||
export default async function SignUpVerification({
|
||||
title,
|
||||
subtitle,
|
||||
dynamic_content,
|
||||
}: SignUpVerificationProps) {
|
||||
const session = await auth()
|
||||
if (session) {
|
||||
|
||||
@@ -6,13 +6,11 @@ import { auth } from "@/auth"
|
||||
import Form from "@/components/Forms/Register"
|
||||
import { getLang } from "@/i18n/serverContext"
|
||||
|
||||
import type { RegisterFormProps } from "@/types/components/form/registerForm"
|
||||
import { SignupFormWrapperProps } from "@/types/components/blocks/dynamicContent"
|
||||
|
||||
export default async function SignupFormWrapper({
|
||||
dynamic_content,
|
||||
}: {
|
||||
dynamic_content: RegisterFormProps
|
||||
}) {
|
||||
}: SignupFormWrapperProps) {
|
||||
const session = await auth()
|
||||
if (session) {
|
||||
// We don't want to allow users to access signup if they are already authenticated.
|
||||
|
||||
@@ -56,7 +56,7 @@ export default async function DynamicContent({
|
||||
case DynamicContentEnum.Blocks.components.sign_up_form:
|
||||
return <SignupFormWrapper dynamic_content={dynamic_content} />
|
||||
case DynamicContentEnum.Blocks.components.sign_up_verification:
|
||||
return <SignUpVerification {...dynamic_content} />
|
||||
return <SignUpVerification dynamic_content={dynamic_content} />
|
||||
case DynamicContentEnum.Blocks.components.soonest_stays:
|
||||
return <SoonestStays {...dynamic_content} />
|
||||
case DynamicContentEnum.Blocks.components.upcoming_stays:
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
"use client"
|
||||
|
||||
import { Checkbox as AriaCheckbox } from "react-aria-components"
|
||||
import { useController, useFormContext } from "react-hook-form"
|
||||
|
||||
|
||||
@@ -19,15 +19,6 @@ export interface OverviewTableProps extends PartialDynamicContent {
|
||||
firstItem: boolean
|
||||
}
|
||||
|
||||
export interface SignUpVerificationProps {
|
||||
title: string
|
||||
subtitle: string
|
||||
}
|
||||
export interface SignupFormWrapperProps extends PartialDynamicContent {}
|
||||
|
||||
export interface SignupFormWrapperProps {
|
||||
dynamic_content: {
|
||||
link: string
|
||||
subtitle: string
|
||||
title: string
|
||||
}
|
||||
}
|
||||
export interface SignUpVerificationProps extends PartialDynamicContent {}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export type RegisterFormProps = {
|
||||
link?: { href: string; text: string }
|
||||
subtitle: string
|
||||
subtitle?: string
|
||||
title: string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user