Merged in feat/SW-3520-update-footer-ui-and-footer-link (pull request #2910)
feat(SW-3520): Updated the footer * feat(SW-3520): Updated links to route to scandic web * feat(SW-3520): Updated the footer with language switcher * feat(SW-3520): Updated the Contact-us link and removed double slash Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
.linksWrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--Space-x2);
|
||||
|
||||
@media screen and (min-width: 768px) {
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
|
||||
.links {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--Space-x1);
|
||||
|
||||
@media screen and (min-width: 768px) {
|
||||
flex-direction: row;
|
||||
}
|
||||
}
|
||||
|
||||
.link {
|
||||
text-decoration: none;
|
||||
color: var(--TEMP-sas-40);
|
||||
|
||||
&:hover {
|
||||
color: var(--TEMP-sas-40);
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
78
apps/partner-sas/components/Menu/FooterMenu/index.tsx
Normal file
78
apps/partner-sas/components/Menu/FooterMenu/index.tsx
Normal file
@@ -0,0 +1,78 @@
|
||||
"use client"
|
||||
|
||||
import { useEffect, useState } from "react"
|
||||
import { useIntl } from "react-intl"
|
||||
import { useMediaQuery } from "usehooks-ts"
|
||||
|
||||
import {
|
||||
customerService,
|
||||
faq,
|
||||
policies,
|
||||
rates,
|
||||
} from "@scandic-hotels/common/constants/routes/customerService"
|
||||
import { partnerSas } from "@scandic-hotels/common/constants/routes/myPages"
|
||||
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 styles from "./footer-menu.module.css"
|
||||
|
||||
export function FooterMenu() {
|
||||
const intl = useIntl()
|
||||
const lang = useLang()
|
||||
const checkIfMobile = useMediaQuery("(max-width: 767px)")
|
||||
const [isMobile, setIsMobile] = useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
setIsMobile(checkIfMobile)
|
||||
}, [checkIfMobile])
|
||||
|
||||
return (
|
||||
<div className={styles.linksWrapper}>
|
||||
<div className={styles.links}>
|
||||
<Typography variant="Body/Paragraph/mdRegular">
|
||||
<Link
|
||||
href={routeToScandicWeb(customerService)[lang]}
|
||||
className={styles.link}
|
||||
>
|
||||
{intl.formatMessage({ defaultMessage: "Contact us" })}
|
||||
</Link>
|
||||
</Typography>
|
||||
<Typography variant="Body/Paragraph/mdRegular">
|
||||
<Link href={routeToScandicWeb(faq)[lang]} className={styles.link}>
|
||||
{intl.formatMessage({ defaultMessage: "FAQ" })}
|
||||
</Link>
|
||||
</Typography>
|
||||
<Typography variant="Body/Paragraph/mdRegular">
|
||||
<Link href={routeToScandicWeb(rates)[lang]} className={styles.link}>
|
||||
{intl.formatMessage({ defaultMessage: "Rates" })}
|
||||
</Link>
|
||||
</Typography>
|
||||
<Typography variant="Body/Paragraph/mdRegular">
|
||||
<Link
|
||||
href={routeToScandicWeb(policies)[lang]}
|
||||
className={styles.link}
|
||||
>
|
||||
{intl.formatMessage({ defaultMessage: "Policies" })}
|
||||
</Link>
|
||||
</Typography>
|
||||
<Typography variant="Body/Paragraph/mdRegular">
|
||||
<Link
|
||||
href={routeToScandicWeb(partnerSas)[lang]}
|
||||
className={styles.link}
|
||||
>
|
||||
{intl.formatMessage({ defaultMessage: "SAS EuroBonus" })}
|
||||
</Link>
|
||||
</Typography>
|
||||
</div>
|
||||
<LanguageSwitcher
|
||||
currentLanguage={lang}
|
||||
isMobile={isMobile}
|
||||
type="footer"
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -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)
|
||||
}}
|
||||
>
|
||||
<span className={styles.bar} />
|
||||
</Button>
|
||||
|
||||
@@ -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 }) {
|
||||
}
|
||||
>
|
||||
<Link
|
||||
href="#"
|
||||
href={routeToScandicWeb(customerService)[lang]}
|
||||
color={isMobile ? "none" : "white"}
|
||||
className={`${styles.menuItem} ${styles.contactLink}`}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user