diff --git a/apps/partner-sas/app/[lang]/layout.tsx b/apps/partner-sas/app/[lang]/layout.tsx index 4cfb47407..90d51e1c7 100644 --- a/apps/partner-sas/app/[lang]/layout.tsx +++ b/apps/partner-sas/app/[lang]/layout.tsx @@ -28,12 +28,12 @@ import { FontPreload } from "@/fonts/font-preloading" import { getMessages } from "@/i18n" import ClientIntlProvider from "@/i18n/Provider" import { setLang } from "@/i18n/serverContext" +import { routeToScandicWeb } from "@/util" import { BookingFlowProviders } from "../../components/BookingFlowProviders" import { Footer } from "../../components/Footer/Footer" import { Header } from "../../components/Header/Header" -import type { LangRoute } from "@scandic-hotels/common/constants/routes/langRoute" import type { Metadata } from "next" export const metadata: Metadata = { @@ -128,11 +128,3 @@ export default async function RootLayout(props: RootLayoutProps) { ) } - -function routeToScandicWeb(route: LangRoute) { - const url = `https://www.scandichotels.com` - return Object.entries(route).reduce((acc, [key, value]) => { - acc[key as Lang] = `${url}${value}` - return acc - }, {} as LangRoute) -} diff --git a/apps/partner-sas/components/Footer/Footer.tsx b/apps/partner-sas/components/Footer/Footer.tsx index 087b5af2e..b5088ecea 100644 --- a/apps/partner-sas/components/Footer/Footer.tsx +++ b/apps/partner-sas/components/Footer/Footer.tsx @@ -1,14 +1,16 @@ -/* eslint-disable formatjs/no-literal-string-in-jsx */ -import Link from "next/link" - import Image from "@scandic-hotels/design-system/Image" import { Typography } from "@scandic-hotels/design-system/Typography" +import { getIntl } from "@/i18n" + +import { FooterMenu } from "../Menu/FooterMenu" import { PoweredByScandic } from "../PoweredByScandic/PoweredByScandic" import styles from "./footer.module.css" -export function Footer() { +export async function Footer() { + const intl = await getIntl() + return (
@@ -23,42 +25,14 @@ export function Footer() { />
-
- - - Privacy policy - - - - - Terms of use - - - - - Your privacy choices - - - - - Cookie Policy - - - - - More links - - -
+
- -

© 1999 Something something.

-

- [Place holder text], LP and SAS are not responsible for content on - external Web sites. + {intl.formatMessage({ + defaultMessage: "© 2025 Scandic Hotels all rights reserved.", + })}

diff --git a/apps/partner-sas/components/Footer/footer.module.css b/apps/partner-sas/components/Footer/footer.module.css index 284f4708c..8ffefc03b 100644 --- a/apps/partner-sas/components/Footer/footer.module.css +++ b/apps/partner-sas/components/Footer/footer.module.css @@ -27,22 +27,3 @@ padding: 32px 40px 40px; } } - -.links { - display: flex; - flex-direction: column; - gap: 8px; - - @media screen and (min-width: 768px) { - flex-direction: row; - } -} - -.link { - text-decoration: none; - color: var(--TEMP-sas-40); - - &:hover { - text-decoration: underline; - } -} diff --git a/apps/partner-sas/components/LanguageSwitcher/index.tsx b/apps/partner-sas/components/LanguageSwitcher/index.tsx index 164e972da..e01ba7527 100644 --- a/apps/partner-sas/components/LanguageSwitcher/index.tsx +++ b/apps/partner-sas/components/LanguageSwitcher/index.tsx @@ -20,11 +20,14 @@ import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import Link from "@scandic-hotels/design-system/Link" import { Typography } from "@scandic-hotels/design-system/Typography" +import { languageSwitcherVariants } from "./variants" + import styles from "./languageSwitcher.module.css" type LanguageSwitcherProps = { currentLanguage: Lang isMobile?: boolean + type?: "footer" | "header" } export function replaceUrlPart(currentPath: string, newPart: string): string { @@ -50,12 +53,16 @@ export function replaceUrlPart(currentPath: string, newPart: string): string { export function LanguageSwitcher({ currentLanguage, isMobile = false, + type = "header", }: LanguageSwitcherProps) { + const classNames = languageSwitcherVariants({ position: type }) + const isFooter = type === "footer" + return ( -
+
{isMobile ? ( - + {({ close }) => ( @@ -96,7 +106,11 @@ export function LanguageSwitcher({ ) : ( - + {({ close }) => ( {isMobile ? ( <> - +
+ +

{intl.formatMessage({ @@ -180,7 +202,7 @@ function LanguageSwitcherContent({ } > { + setIsMobile(checkIfMobile) + }, [checkIfMobile]) + + return ( +
+
+ + + {intl.formatMessage({ defaultMessage: "Contact us" })} + + + + + {intl.formatMessage({ defaultMessage: "FAQ" })} + + + + + {intl.formatMessage({ defaultMessage: "Rates" })} + + + + + {intl.formatMessage({ defaultMessage: "Policies" })} + + + + + {intl.formatMessage({ defaultMessage: "SAS EuroBonus" })} + + +
+ +
+ ) +} diff --git a/apps/partner-sas/components/Menu/MobileMenu/index.tsx b/apps/partner-sas/components/Menu/MobileMenu/index.tsx index e460415f4..28a132ecf 100644 --- a/apps/partner-sas/components/Menu/MobileMenu/index.tsx +++ b/apps/partner-sas/components/Menu/MobileMenu/index.tsx @@ -30,7 +30,10 @@ export function MobileMenu({ children }: React.PropsWithChildren) { type="button" className={`${styles.hamburger} ${isOpen ? styles.isExpanded : ""}`} aria-label={isOpen ? closeMsg : openMsg} - onPress={() => setIsOpen(!isOpen)} + onPress={() => { + window.scrollTo(0, 0) + setIsOpen(!isOpen) + }} > diff --git a/apps/partner-sas/components/Menu/NavigationMenu/index.tsx b/apps/partner-sas/components/Menu/NavigationMenu/index.tsx index dd98ae81e..cea19e33f 100644 --- a/apps/partner-sas/components/Menu/NavigationMenu/index.tsx +++ b/apps/partner-sas/components/Menu/NavigationMenu/index.tsx @@ -2,12 +2,14 @@ import { useIntl } from "react-intl" +import { customerService } from "@scandic-hotels/common/constants/routes/customerService" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import Link from "@scandic-hotels/design-system/Link" import { Typography } from "@scandic-hotels/design-system/Typography" import { LanguageSwitcher } from "@/components/LanguageSwitcher" import useLang from "@/hooks/useLang" +import { routeToScandicWeb } from "@/util" import { UserMenu } from "../UserMenu" @@ -29,7 +31,7 @@ export function NavigationMenu({ isMobile = false }: { isMobile?: boolean }) { } > diff --git a/apps/partner-sas/globals.css b/apps/partner-sas/globals.css index 8cce1f8c6..54b782058 100644 --- a/apps/partner-sas/globals.css +++ b/apps/partner-sas/globals.css @@ -42,6 +42,7 @@ --TEMP-sas-20: #00175c; --TEMP-sas-40: #0030c2; --Text-sas-20: #333; + --SAS-90: #e5e5e5; @supports (interpolate-size: allow-keywords) { interpolate-size: allow-keywords; diff --git a/apps/partner-sas/util/index.ts b/apps/partner-sas/util/index.ts new file mode 100644 index 000000000..4036f4e69 --- /dev/null +++ b/apps/partner-sas/util/index.ts @@ -0,0 +1,10 @@ +import type { Lang } from "@scandic-hotels/common/constants/language" +import type { LangRoute } from "@scandic-hotels/common/constants/routes/langRoute" + +export function routeToScandicWeb(route: LangRoute) { + const url = `https://www.scandichotels.com` + return Object.entries(route).reduce((acc, [key, value]) => { + acc[key as Lang] = `${url}${value}` + return acc + }, {} as LangRoute) +} diff --git a/packages/common/constants/routes/customerService.ts b/packages/common/constants/routes/customerService.ts index 6307a4ff0..cf63c4535 100644 --- a/packages/common/constants/routes/customerService.ts +++ b/packages/common/constants/routes/customerService.ts @@ -10,3 +10,30 @@ export const customerService = { no: `/${Lang.no}/kundeservice`, sv: `/${Lang.sv}/kundservice`, } as const satisfies LangRoute + +export const faq = { + da: `${customerService[Lang.da]}/sporgsmal-og-svar`, + de: `${customerService[Lang.de]}/haufig-gestellte-fragen`, + en: `${customerService[Lang.en]}/faq`, + fi: `${customerService[Lang.fi]}/usein-kysytyt-kysymykset`, + no: `${customerService[Lang.no]}/sporsmal-svar`, + sv: `${customerService[Lang.sv]}/faq`, +} as const satisfies LangRoute + +export const rates = { + da: `${customerService[Lang.da]}/priser`, + de: `${customerService[Lang.de]}/raten`, + en: `${customerService[Lang.en]}/rates`, + fi: `${customerService[Lang.fi]}/hinnat`, + no: `${customerService[Lang.no]}/priser`, + sv: `${customerService[Lang.sv]}/priser`, +} as const satisfies LangRoute + +export const policies = { + da: `${customerService[Lang.da]}/politikker`, + de: `${customerService[Lang.de]}/richtlinien`, + en: `${customerService[Lang.en]}/policies`, + fi: `${customerService[Lang.fi]}/ehdot`, + no: `${customerService[Lang.no]}/betingelser`, + sv: `${customerService[Lang.sv]}/villkor`, +} as const satisfies LangRoute