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:
@@ -0,0 +1,37 @@
|
||||
"use client"
|
||||
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
import { LoginButton } from "@scandic-hotels/design-system/LoginButton"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
import useLang from "@/hooks/useLang"
|
||||
import { useLazyPathname } from "@/hooks/useLazyPathname"
|
||||
import { trackLoginClick } from "@/utils/tracking"
|
||||
|
||||
export function LoyaltyLoginButton() {
|
||||
const intl = useIntl()
|
||||
const lang = useLang()
|
||||
const loginPathname = useLazyPathname()
|
||||
|
||||
return (
|
||||
<LoginButton
|
||||
lang={lang}
|
||||
onClick={() => {
|
||||
trackLoginClick("join scandic friends sidebar")
|
||||
}}
|
||||
pathName={loginPathname}
|
||||
trackingId="loginJoinLoyalty"
|
||||
>
|
||||
<MaterialIcon icon="arrow_forward" color="CurrentColor" size={20} />
|
||||
<Typography variant={"Body/Paragraph/mdRegular"}>
|
||||
<span>
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "Log in here",
|
||||
})}
|
||||
</span>
|
||||
</Typography>
|
||||
</LoginButton>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user