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