Files
web/apps/scandic-web/components/Header/MainMenu/LogoLink/index.tsx
Matilda Landström 5de2a993a7 Merged in feat/SW-1711-switch-icons (pull request #1558)
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
2025-03-27 09:42:52 +00:00

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>
)
}