fix(SW-360): terms and conditions URL's

This commit is contained in:
Chuma McPhoy
2024-10-09 13:30:12 +02:00
committed by Pontus Dreij
parent a9033af4bd
commit 967a7a8935
2 changed files with 24 additions and 1 deletions

View File

@@ -4,6 +4,8 @@ import { zodResolver } from "@hookform/resolvers/zod"
import { FormProvider, useForm } from "react-hook-form"
import { useIntl } from "react-intl"
import { signupTerms } from "@/constants/routes/signup"
import { registerUser } from "@/actions/registerUser"
import Button from "@/components/TempDesignSystem/Button"
import Checkbox from "@/components/TempDesignSystem/Form/Checkbox"
@@ -18,6 +20,7 @@ import Caption from "@/components/TempDesignSystem/Text/Caption"
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
import Title from "@/components/TempDesignSystem/Text/Title"
import { toast } from "@/components/TempDesignSystem/Toasts"
import useLang from "@/hooks/useLang"
import { RegisterSchema, registerSchema } from "./schema"
@@ -27,6 +30,7 @@ import type { RegisterFormProps } from "@/types/components/form/registerForm"
export default function Form({ link, subtitle, title }: RegisterFormProps) {
const intl = useIntl()
const lang = useLang()
const methods = useForm<RegisterSchema>({
defaultValues: {
firstName: "",
@@ -155,7 +159,12 @@ export default function Form({ link, subtitle, title }: RegisterFormProps) {
{intl.formatMessage({
id: "Yes, I accept the Terms and conditions for Scandic Friends and understand that Scandic will process my personal data in accordance with",
})}{" "}
<Link variant="underscored" color="peach80" href="/privacy">
<Link
variant="underscored"
color="peach80"
target="_blank"
href={signupTerms[lang]}
>
{intl.formatMessage({ id: "Scandic's Privacy Policy." })}
</Link>
</Body>