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

This commit is contained in:
Chuma McPhoy
2024-10-09 13:30:12 +02:00
parent 2fce70e866
commit cae0648b2f
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>

View File

@@ -17,3 +17,17 @@ export const signupVerify: LangRoute = {
da: `${signup.da}/bekraeft`,
de: `${signup.de}/verifizieren`,
}
/* No work has been scoped out to implement terms of privacy pages for new web yet,
* which is why these currently link to routes in current web.
* TODO: Align w. stakeholders, make tickets (and reference them here) to update these
* links when the time comes.
*/
export const signupTerms: LangRoute = {
en: "https://www.scandichotels.com/customer-service/rates-and-policies/privacy-policy",
sv: "https://www.scandichotels.se/kundservice/priser-och-bokningsregler/integritetspolicy",
no: "https://www.scandichotels.no/kundeservice/priser-og-bestillingsvilkar/personvernpolicy",
fi: "https://www.scandichotels.fi/asiakaspalvelu/hinnat-ja-varausehdot/tietosuojaseloste",
da: "https://www.scandichotels.dk/kundeservice/priser-og-bookingvilkar/persondatapolitik",
de: "https://www.scandichotels.de/kundenbetreuung/preise-und-richtlinien/datenschutzrichtlinie",
}