Merged in refactor/SW-2826-align-urls (pull request #3359)
refactor(SW-2826): align urls * refactor(SW-2826): align urls Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import { bookingTermsAndConditionsRoutes } from "@scandic-hotels/common/constants/routes/bookingTermsAndConditionsRoutes"
|
||||
import { customerService } from "@scandic-hotels/common/constants/routes/customerService"
|
||||
import { membershipTermsAndConditions } from "@scandic-hotels/common/constants/routes/membershipTermsAndConditions"
|
||||
import {
|
||||
bookingTerms,
|
||||
customerService,
|
||||
scandicFriends,
|
||||
privacy,
|
||||
} from "@scandic-hotels/common/constants/routes/customerService"
|
||||
import { myStay } from "@scandic-hotels/common/constants/routes/myStay"
|
||||
import { privacyPolicyRoutes } from "@scandic-hotels/common/constants/routes/privacyPolicyRoutes"
|
||||
|
||||
import { env } from "@/env/server"
|
||||
|
||||
@@ -18,14 +20,10 @@ export const bookingFlowConfig: BookingFlowConfig = {
|
||||
variant: "partner-sas",
|
||||
routes: {
|
||||
myStay: routeToScandicWeb(myStay),
|
||||
bookingTermsAndConditions: routeToScandicWeb(
|
||||
bookingTermsAndConditionsRoutes
|
||||
),
|
||||
membershipTermsAndConditions: routeToScandicWeb(
|
||||
membershipTermsAndConditions
|
||||
),
|
||||
bookingTermsAndConditions: routeToScandicWeb(bookingTerms),
|
||||
membershipTermsAndConditions: routeToScandicWeb(scandicFriends),
|
||||
customerService: routeToScandicWeb(customerService),
|
||||
privacyPolicy: routeToScandicWeb(privacyPolicyRoutes),
|
||||
privacyPolicy: routeToScandicWeb(privacy),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@ import { useRouter } from "next/navigation"
|
||||
import { FormProvider, useForm } from "react-hook-form"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { membershipTermsAndConditions } from "@scandic-hotels/common/constants/routes/membershipTermsAndConditions"
|
||||
import { privacyPolicyRoutes } from "@scandic-hotels/common/constants/routes/privacyPolicyRoutes"
|
||||
import { logger } from "@scandic-hotels/common/logger"
|
||||
import {
|
||||
formatPhoneNumber,
|
||||
@@ -40,6 +38,10 @@ import { requestOpen } from "@/utils/profilingConsent"
|
||||
import { trackLinkClick } from "@/utils/tracking/profilingConsent"
|
||||
|
||||
import styles from "./form.module.css"
|
||||
import {
|
||||
privacy,
|
||||
scandicFriends,
|
||||
} from "@scandic-hotels/common/constants/routes/customerService"
|
||||
|
||||
interface SignUpFormProps {
|
||||
title: string
|
||||
@@ -362,7 +364,7 @@ export default function SignupForm({
|
||||
<TextLink
|
||||
color="Text/Interactive/Secondary"
|
||||
target="_blank"
|
||||
href={membershipTermsAndConditions[lang]}
|
||||
href={scandicFriends[lang]}
|
||||
isInline
|
||||
>
|
||||
{str}
|
||||
@@ -372,7 +374,7 @@ export default function SignupForm({
|
||||
<TextLink
|
||||
color="Text/Interactive/Secondary"
|
||||
target="_blank"
|
||||
href={privacyPolicyRoutes[lang]}
|
||||
href={privacy[lang]}
|
||||
isInline
|
||||
>
|
||||
{str}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { useFormContext } from "react-hook-form"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { bookingTermsAndConditionsRoutes } from "@scandic-hotels/common/constants/routes/bookingTermsAndConditionsRoutes"
|
||||
import { privacyPolicyRoutes } from "@scandic-hotels/common/constants/routes/privacyPolicyRoutes"
|
||||
import Checkbox from "@scandic-hotels/design-system/Form/Checkbox"
|
||||
import { ErrorMessage } from "@scandic-hotels/design-system/Form/ErrorMessage"
|
||||
import { TextLink } from "@scandic-hotels/design-system/TextLink"
|
||||
@@ -12,6 +10,10 @@ import useLang from "@/hooks/useLang"
|
||||
import { getErrorMessage } from "@/utils/getErrorMessage"
|
||||
|
||||
import styles from "./termsAndConditions.module.css"
|
||||
import {
|
||||
bookingTerms,
|
||||
privacy,
|
||||
} from "@scandic-hotels/common/constants/routes/customerService"
|
||||
|
||||
export default function TermsAndConditions() {
|
||||
const intl = useIntl()
|
||||
@@ -28,7 +30,7 @@ export default function TermsAndConditions() {
|
||||
{
|
||||
termsAndConditionsLink: (str) => (
|
||||
<TextLink
|
||||
href={bookingTermsAndConditionsRoutes[lang]}
|
||||
href={bookingTerms[lang]}
|
||||
theme="InteractiveDefault"
|
||||
typography="Link/sm"
|
||||
target="_blank"
|
||||
@@ -39,7 +41,7 @@ export default function TermsAndConditions() {
|
||||
),
|
||||
privacyPolicyLink: (str) => (
|
||||
<TextLink
|
||||
href={privacyPolicyRoutes[lang]}
|
||||
href={privacy[lang]}
|
||||
theme="InteractiveDefault"
|
||||
typography="Link/sm"
|
||||
target="_blank"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { membershipTermsAndConditions } from "@scandic-hotels/common/constants/routes/membershipTermsAndConditions"
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||
import Subtitle from "@scandic-hotels/design-system/Subtitle"
|
||||
@@ -9,6 +8,7 @@ import { getIntl } from "@/i18n"
|
||||
import { getLang } from "@/i18n/serverContext"
|
||||
|
||||
import styles from "./readMore.module.css"
|
||||
import { scandicFriends } from "@scandic-hotels/common/constants/routes/myPages"
|
||||
|
||||
export default async function ReadMore() {
|
||||
const [intl, lang] = await Promise.all([getIntl(), getLang()])
|
||||
@@ -22,7 +22,7 @@ export default async function ReadMore() {
|
||||
}),
|
||||
},
|
||||
{
|
||||
href: membershipTermsAndConditions[lang],
|
||||
href: scandicFriends[lang],
|
||||
text: intl.formatMessage({
|
||||
id: "loyalty.membershipTermsAndConditions",
|
||||
defaultMessage: "Membership terms and conditions",
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import { bookingTermsAndConditionsRoutes } from "@scandic-hotels/common/constants/routes/bookingTermsAndConditionsRoutes"
|
||||
import { customerService } from "@scandic-hotels/common/constants/routes/customerService"
|
||||
import { membershipTermsAndConditions } from "@scandic-hotels/common/constants/routes/membershipTermsAndConditions"
|
||||
import {
|
||||
bookingTerms,
|
||||
customerService,
|
||||
privacy,
|
||||
scandicFriends,
|
||||
} from "@scandic-hotels/common/constants/routes/customerService"
|
||||
import { myStay } from "@scandic-hotels/common/constants/routes/myStay"
|
||||
import { privacyPolicyRoutes } from "@scandic-hotels/common/constants/routes/privacyPolicyRoutes"
|
||||
|
||||
import type { BookingFlowConfig } from "@scandic-hotels/booking-flow/BookingFlowConfig"
|
||||
|
||||
@@ -15,8 +17,8 @@ export const bookingFlowConfig: BookingFlowConfig = {
|
||||
routes: {
|
||||
myStay,
|
||||
customerService,
|
||||
bookingTermsAndConditions: bookingTermsAndConditionsRoutes,
|
||||
membershipTermsAndConditions,
|
||||
privacyPolicy: privacyPolicyRoutes,
|
||||
bookingTermsAndConditions: bookingTerms,
|
||||
membershipTermsAndConditions: scandicFriends,
|
||||
privacyPolicy: privacy,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user