From c3590dfe7500957be19ff27cdeed9d300097149f Mon Sep 17 00:00:00 2001 From: Chuma McPhoy Date: Fri, 11 Oct 2024 12:02:40 +0200 Subject: [PATCH] fix: reuse currentWebHrefs for signup --- components/Forms/Register/index.tsx | 4 +-- constants/currentWebHrefs.ts | 39 ++++++++++++++++++----------- constants/routes/signup.ts | 14 ----------- 3 files changed, 27 insertions(+), 30 deletions(-) diff --git a/components/Forms/Register/index.tsx b/components/Forms/Register/index.tsx index e154817ff..f8b79f61e 100644 --- a/components/Forms/Register/index.tsx +++ b/components/Forms/Register/index.tsx @@ -4,7 +4,7 @@ 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 { privacyPolicy } from "@/constants/currentWebHrefs" import { registerUser } from "@/actions/registerUser" import Button from "@/components/TempDesignSystem/Button" @@ -163,7 +163,7 @@ export default function Form({ link, subtitle, title }: RegisterFormProps) { variant="underscored" color="peach80" target="_blank" - href={signupTerms[lang]} + href={privacyPolicy[lang]} > {intl.formatMessage({ id: "Scandic's Privacy Policy." })} diff --git a/constants/currentWebHrefs.ts b/constants/currentWebHrefs.ts index d0ebfe954..7438ee13a 100644 --- a/constants/currentWebHrefs.ts +++ b/constants/currentWebHrefs.ts @@ -1,17 +1,28 @@ -export const bookingTermsAndConditions = { - da: "https://www.scandichotels.dk/kundeservice/priser-og-bookingvilkar/vilkar-og-betingelser3", - de: "https://www.scandichotels.de/kundenbetreuung/preise-und-richtlinien/reservierungsbedingungen", - en: "https://www.scandichotels.com/customer-service/rates-and-policies/terms-conditions", - fi: "https://www.scandichotels.fi/asiakaspalvelu/hinnat-ja-varausehdot/varausehdot", - no: "https://www.scandichotels.no/kundeservice/priser-og-bestillingsvilkar/reservasjonsbetingelser", - sv: "https://www.scandichotels.se/kundservice/priser-och-bokningsregler/bokningsregler", +import { LangRoute } from "@/types/routes" + +const baseUrl: LangRoute = { + da: "https://www.scandichotels.dk", + de: "https://www.scandichotels.de", + en: "https://www.scandichotels.com", + fi: "https://www.scandichotels.fi", + no: "https://www.scandichotels.no", + sv: "https://www.scandichotels.se", } -export const privacyPolicy = { - da: "https://www.scandichotels.dk/kundeservice/priser-og-bookingvilkar/persondatapolitik", - de: "https://www.scandichotels.de/kundenbetreuung/preise-und-richtlinien/reservierungsbedingungen", - en: "https://www.scandichotels.com/customer-service/rates-and-policies/privacy-policy", - fi: "https://www.scandichotels.fi/asiakaspalvelu/hinnat-ja-varausehdot/tietosuojaseloste", - no: "https://www.scandichotels.no/kundeservice/priser-og-bestillingsvilkar/personvernpolicy", - sv: "https://www.scandichotels.se/kundservice/priser-och-bokningsregler/integritetspolicy", +export const bookingTermsAndConditions: LangRoute = { + da: `${baseUrl.da}/kundeservice/priser-og-bookingvilkar/vilkar-og-betingelser3`, + de: `${baseUrl.de}/kundenbetreuung/preise-und-richtlinien/reservierungsbedingungen`, + en: `${baseUrl.en}/customer-service/rates-and-policies/terms-conditions`, + fi: `${baseUrl.fi}/asiakaspalvelu/hinnat-ja-varausehdot/varausehdot`, + no: `${baseUrl.no}/kundeservice/priser-og-bestillingsvilkar/reservasjonsbetingelser`, + sv: `${baseUrl.sv}/kundservice/priser-och-bokningsregler/bokningsregler`, +} + +export const privacyPolicy: LangRoute = { + da: `${baseUrl.da}/kundeservice/priser-og-bookingvilkar/persondatapolitik`, + de: `${baseUrl.de}/kundenbetreuung/preise-und-richtlinien/datenschutzrichtlinie`, + en: `${baseUrl.en}/customer-service/rates-and-policies/privacy-policy`, + fi: `${baseUrl.fi}/asiakaspalvelu/hinnat-ja-varausehdot/tietosuojaseloste`, + no: `${baseUrl.no}/kundeservice/priser-og-bestillingsvilkar/personvernpolicy`, + sv: `${baseUrl.sv}/kundservice/priser-och-bokningsregler/integritetspolicy`, } diff --git a/constants/routes/signup.ts b/constants/routes/signup.ts index 16d4f171d..82a39ee41 100644 --- a/constants/routes/signup.ts +++ b/constants/routes/signup.ts @@ -17,17 +17,3 @@ 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", -}