Switches out all the old icons to new ones, and moves them to the design system. The new icons are of three different types: Materialise Symbol, Nucleo, and Customized. Also adds further mapping between facilities/amenities and icons. Approved-by: Michael Zetterberg Approved-by: Erik Tiekstra
41 lines
969 B
TypeScript
41 lines
969 B
TypeScript
"use client"
|
|
import NextLink from "next/link"
|
|
import { useIntl } from "react-intl"
|
|
|
|
import { ScandicLogoIcon } from "@scandic-hotels/design-system/Icons"
|
|
|
|
import useDropdownStore from "@/stores/main-menu"
|
|
|
|
import useLang from "@/hooks/useLang"
|
|
|
|
import styles from "./logoLink.module.css"
|
|
|
|
import { DropdownTypeEnum } from "@/types/components/dropdown/dropdown"
|
|
|
|
export function LogoLink() {
|
|
const lang = useLang()
|
|
const intl = useIntl()
|
|
const { toggleDropdown, isHamburgerMenuOpen } = useDropdownStore()
|
|
|
|
function handleNavigate() {
|
|
if (isHamburgerMenuOpen) {
|
|
toggleDropdown(DropdownTypeEnum.HamburgerMenu)
|
|
}
|
|
}
|
|
|
|
return (
|
|
<NextLink
|
|
className={styles.logoLink}
|
|
href={`/${lang}`}
|
|
onClick={handleNavigate}
|
|
aria-label={intl.formatMessage({ id: "Back to scandichotels.com" })}
|
|
>
|
|
<ScandicLogoIcon
|
|
width="103px"
|
|
height="22px"
|
|
color="Icon/Interactive/Accent"
|
|
/>
|
|
</NextLink>
|
|
)
|
|
}
|