feat(SW-186): Some small changes and cleanup

This commit is contained in:
Erik Tiekstra
2024-09-05 11:06:11 +02:00
parent 55fdbc527b
commit a8cca69438
6 changed files with 20 additions and 61 deletions

View File

@@ -19,6 +19,7 @@ import type { MobileMenuProps } from "@/types/components/header/mobileMenu"
export default function MobileMenu({
menuItems,
languageUrls,
topLink,
}: MobileMenuProps) {
const intl = useIntl()
const {
@@ -71,10 +72,12 @@ export default function MobileMenu({
<SearchIcon width={20} height={20} color="burgundy" />
{intl.formatMessage({ id: "Find booking" })}
</HeaderLink>
<HeaderLink href="#">
<GiftIcon width={20} height={20} color="burgundy" />
{intl.formatMessage({ id: "Join Scandic Friends" })}
</HeaderLink>
{topLink ? (
<HeaderLink href={topLink.href}>
<GiftIcon width={20} height={20} color="burgundy" />
{topLink.title}
</HeaderLink>
) : null}
<HeaderLink href="#">
<ServiceIcon width={20} height={20} color="burgundy" />
{intl.formatMessage({ id: "Customer service" })}

View File

@@ -21,6 +21,7 @@ import type { MainMenuProps } from "@/types/components/header/mainMenu"
export default async function MainMenu({
languageUrls,
menuItems,
topLink,
}: MainMenuProps) {
const intl = await getIntl()
const lang = getLang()
@@ -46,9 +47,7 @@ export default async function MainMenu({
/>
</NextLink>
<div className={styles.menus}>
{menuItems?.length ? (
<NavigationMenu items={menuItems} isMobile={false} />
) : null}
<NavigationMenu items={menuItems} isMobile={false} />
{user ? (
<>
<MyPagesMenu
@@ -74,9 +73,11 @@ export default async function MainMenu({
</span>
</Link>
)}
{menuItems?.length ? (
<MobileMenu languageUrls={languageUrls} menuItems={menuItems} />
) : null}
<MobileMenu
languageUrls={languageUrls}
menuItems={menuItems}
topLink={topLink}
/>
</div>
</nav>
</div>