+
{intl.formatMessage(
@@ -58,32 +59,32 @@ export default function MyPagesMenuContent({
)}
- {membershipLevel && membershipPoints ? (
-
- {membershipLevel.name}
-
- {intl.formatMessage(
- {
- id: "common.pointsAmountPoints",
- defaultMessage: "{pointsAmount, number} points",
- },
- { pointsAmount: membershipPoints }
- )}
-
-
+ {showMembershipInfo ? (
+
+
+
+ {membershipLevel.name}
+
+
+
+
+ {intl.formatMessage(
+ {
+ id: "common.pointsAmountPoints",
+ defaultMessage: "{pointsAmount, number} points",
+ },
+ { pointsAmount: membershipPoints }
+ )}
+
+
+
) : null}
+
-
+
+
+
)
@@ -100,22 +101,11 @@ function PrimaryLinks({
return (
- {primaryLinks.map((link, i) => (
- -
-
- {link.text}
-
-
+ {primaryLinks.map(({ text, href }) => (
+
-
+
+ {text}
+
))}
@@ -135,35 +125,20 @@ function SecondaryLinks({
return (
- {secondaryLinks.map((link, i) => (
- -
-
- {link.text}
-
-
+ {secondaryLinks.map(({ text, href }) => (
+
-
+
+ {text}
+
))}
-
-
+
{intl.formatMessage({
id: "common.logOut",
defaultMessage: "Log out",
})}
-
+
)
diff --git a/apps/scandic-web/components/Header/MainMenu/MyPagesMenuContent/myPagesMenuContent.module.css b/apps/scandic-web/components/Header/MainMenu/MyPagesMenuContent/myPagesMenuContent.module.css
index 3b7f11d5c..8d4c09655 100644
--- a/apps/scandic-web/components/Header/MainMenu/MyPagesMenuContent/myPagesMenuContent.module.css
+++ b/apps/scandic-web/components/Header/MainMenu/MyPagesMenuContent/myPagesMenuContent.module.css
@@ -6,44 +6,29 @@
padding: 0 var(--Space-x1);
}
-.myPagesMenuContent .friendTypeWrapper {
- color: var(--UI-Text-Medium-contrast);
+.friendTypeWrapper {
+ color: var(--Text-Secondary);
}
.divider {
margin: var(--Space-x2) 0;
}
-.friendType {
- font-family: var(--typography-Title-5-fontFamily);
- letter-spacing: var(--typography-Title-5-letterSpacing);
- font-size: var(--typography-Caption-Bold-fontSize);
- text-transform: uppercase;
-}
-
.friendType::after {
content: " ยท ";
display: inline;
padding: 0 var(--Space-x05);
}
-.groups,
.menuItems {
list-style: none;
}
-.link:not(:hover) .arrow {
- opacity: 0;
-}
-
-.arrow {
- flex-shrink: 0;
-}
-
@media screen and (min-width: 768px) {
.myPagesMenuContent {
padding: var(--Space-x2) var(--Space-x4);
}
+
.intro.noMembership,
.userName {
display: none;
diff --git a/apps/scandic-web/components/Header/MainMenu/MyPagesMenuWrapper/index.tsx b/apps/scandic-web/components/Header/MainMenu/MyPagesMenuWrapper/index.tsx
index 2db375085..84c216440 100644
--- a/apps/scandic-web/components/Header/MainMenu/MyPagesMenuWrapper/index.tsx
+++ b/apps/scandic-web/components/Header/MainMenu/MyPagesMenuWrapper/index.tsx
@@ -28,7 +28,13 @@ export default function MyPagesMenuWrapper() {
const { data: session } = useSession()
const isUserLoggedIn = isValidSession(session)
- const { data: user, isLoading: isLoadingUser } = trpc.user.name.useQuery()
+ const { data: user, isLoading: isLoadingUser } = trpc.user.name.useQuery(
+ undefined,
+ {
+ refetchOnWindowFocus: true,
+ refetchInterval: 300_000,
+ }
+ )
const { data: membership, isLoading: isLoadingMembership } =
trpc.user.safeMembershipLevel.useQuery()
diff --git a/apps/scandic-web/components/Header/MainMenu/MyPagesMobileMenu/index.tsx b/apps/scandic-web/components/Header/MainMenu/MyPagesMobileMenu/index.tsx
index 300a6ad32..ece810191 100644
--- a/apps/scandic-web/components/Header/MainMenu/MyPagesMobileMenu/index.tsx
+++ b/apps/scandic-web/components/Header/MainMenu/MyPagesMobileMenu/index.tsx
@@ -51,8 +51,7 @@ export default function MyPagesMobileMenu({
return (
toggleDropdown(DropdownTypeEnum.MyPagesMobileMenu)}
+ onPress={() => toggleDropdown(DropdownTypeEnum.MyPagesMobileMenu)}
aria-label={intl.formatMessage({
id: "header.openMyPagesMenu",
defaultMessage: "Open my pages menu",
@@ -85,7 +84,7 @@ export default function MyPagesMobileMenu({
export function MyPagesMobileMenuSkeleton() {
return (
diff --git a/apps/scandic-web/components/Header/MainMenu/MyPagesMobileMenu/myPagesMobileMenu.module.css b/apps/scandic-web/components/Header/MainMenu/MyPagesMobileMenu/myPagesMobileMenu.module.css
index bb9704d3a..868200d4a 100644
--- a/apps/scandic-web/components/Header/MainMenu/MyPagesMobileMenu/myPagesMobileMenu.module.css
+++ b/apps/scandic-web/components/Header/MainMenu/MyPagesMobileMenu/myPagesMobileMenu.module.css
@@ -1,13 +1,3 @@
-@keyframes slide-in {
- from {
- right: -100vw;
- }
-
- to {
- right: 0;
- }
-}
-
.modal {
position: fixed;
top: calc(var(--main-menu-mobile-height) + var(--alert-and-banner-height));
@@ -16,13 +6,14 @@
width: 100%;
background-color: var(--Base-Surface-Primary-light-Normal);
z-index: var(--menu-overlay-z-index);
-}
-.modal[data-entering] {
- animation: slide-in 0.3s;
-}
-.modal[data-exiting] {
- animation: slide-in 0.3s reverse;
+ &[data-entering] {
+ animation: slide-in 0.3s;
+ }
+
+ &[data-exiting] {
+ animation: slide-in 0.3s reverse;
+ }
}
.dialog {
@@ -36,3 +27,13 @@
display: none;
}
}
+
+@keyframes slide-in {
+ from {
+ right: -100vw;
+ }
+
+ to {
+ right: 0;
+ }
+}
diff --git a/apps/scandic-web/components/Header/MainMenu/NavigationMenu/MegaMenu/index.tsx b/apps/scandic-web/components/Header/MainMenu/NavigationMenu/MegaMenu/index.tsx
index d81ad4f76..4295dfa6d 100644
--- a/apps/scandic-web/components/Header/MainMenu/NavigationMenu/MegaMenu/index.tsx
+++ b/apps/scandic-web/components/Header/MainMenu/NavigationMenu/MegaMenu/index.tsx
@@ -1,15 +1,19 @@
"use client"
+import { cx } from "class-variance-authority"
+import { Button as ButtonRAC } from "react-aria-components"
import FocusLock from "react-focus-lock"
+import ButtonLink from "@scandic-hotels/design-system/ButtonLink"
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
-import Link from "@scandic-hotels/design-system/OldDSLink"
import { Typography } from "@scandic-hotels/design-system/Typography"
import useDropdownStore from "@/stores/main-menu"
import Card from "@/components/TempDesignSystem/Card"
+import { MenuLink } from "../../MenuLink"
+
import styles from "./megaMenu.module.css"
import { DropdownTypeEnum } from "@/types/components/dropdown/dropdown"
@@ -35,14 +39,13 @@ export default function MegaMenu({
return (
-