Merged in chore/SW-3381-move-loginbutton-to-ds- (pull request #2752)
chore(SW-3381) Moved LoginButton to design system * chore(SW-3381) Moved LoginButton to design system Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -5,20 +5,21 @@ import { usePathname } from "next/navigation"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { findMyBookingCurrentWebPath } from "@scandic-hotels/common/constants/routes/findMyBooking"
|
||||
import { logout } from "@scandic-hotels/common/constants/routes/handleAuth"
|
||||
import { myPages } from "@scandic-hotels/common/constants/routes/myPages"
|
||||
import { getCurrentWebUrl } from "@scandic-hotels/common/utils/url"
|
||||
import Image from "@scandic-hotels/design-system/Image"
|
||||
import Link from "@scandic-hotels/design-system/Link"
|
||||
import { LoginButton } from "@scandic-hotels/design-system/LoginButton"
|
||||
import SkeletonShimmer from "@scandic-hotels/design-system/SkeletonShimmer"
|
||||
|
||||
import { logout } from "@/constants/routes/handleAuth"
|
||||
import { env } from "@/env/client"
|
||||
import useDropdownStore from "@/stores/main-menu"
|
||||
|
||||
import LoginButton from "@/components/LoginButton"
|
||||
import Avatar from "@/components/MyPages/Avatar"
|
||||
import useLang from "@/hooks/useLang"
|
||||
import { trackClick } from "@/utils/tracking"
|
||||
import { useLazyPathname } from "@/hooks/useLazyPathname"
|
||||
import { trackClick, trackLoginClick } from "@/utils/tracking"
|
||||
|
||||
import BookingButton from "../BookingButton"
|
||||
|
||||
@@ -42,6 +43,7 @@ export function MainMenu({
|
||||
const lang = useLang()
|
||||
const pathname = usePathname()
|
||||
const baseUrl = env.NEXT_PUBLIC_PUBLIC_URL || "https://www.scandichotels.com"
|
||||
const loginPathname = useLazyPathname()
|
||||
|
||||
const isThreeStaticPagesPathnames = [
|
||||
"/de/sponsoring",
|
||||
@@ -149,9 +151,13 @@ export function MainMenu({
|
||||
</li>
|
||||
<li className={styles.mobileLinkRow}>
|
||||
<LoginButton
|
||||
position="hamburger menu"
|
||||
lang={lang}
|
||||
pathName={loginPathname}
|
||||
trackingId="loginStartHamburgerMenu"
|
||||
className={styles.mobileLinkButton}
|
||||
onClick={() => {
|
||||
trackLoginClick("hamburger menu")
|
||||
}}
|
||||
>
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "Log in",
|
||||
|
||||
Reference in New Issue
Block a user