feat(BOOK-212): Refactored LoginButton and added successful tracking functionality
Approved-by: Linus Flood
This commit is contained in:
@@ -7,7 +7,6 @@ import { formatPrice } from "@scandic-hotels/common/utils/numberFormatting"
|
||||
import Footnote from "@scandic-hotels/design-system/Footnote"
|
||||
import Checkbox from "@scandic-hotels/design-system/Form/Checkbox"
|
||||
import { LoginButton } from "@scandic-hotels/design-system/LoginButton"
|
||||
import { OldDSButton as Button } from "@scandic-hotels/design-system/OldDSButton"
|
||||
import Link from "@scandic-hotels/design-system/OldDSLink"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
import { trackLoginClick } from "@scandic-hotels/tracking/navigation"
|
||||
@@ -74,23 +73,23 @@ export function JoinScandicFriendsCard({ name = "join" }: Props) {
|
||||
</Typography>
|
||||
</Checkbox>
|
||||
|
||||
<Button size="small" color="Primary" asChild>
|
||||
<LoginButton
|
||||
lang={lang}
|
||||
className={styles.login}
|
||||
color="white"
|
||||
trackingId="join-scandic-friends-enter-details"
|
||||
onClick={() => {
|
||||
trackLoginClick("enter details")
|
||||
}}
|
||||
redirectTo={loginPathname}
|
||||
>
|
||||
{intl.formatMessage({
|
||||
id: "enterDetails.joinScandicFriendsCard.loginButtonText",
|
||||
defaultMessage: "Log in",
|
||||
})}
|
||||
</LoginButton>
|
||||
</Button>
|
||||
<LoginButton
|
||||
color="Primary"
|
||||
variant="Tertiary"
|
||||
size="Small"
|
||||
lang={lang}
|
||||
className={styles.login}
|
||||
loginPosition="enter-details"
|
||||
onClick={() => {
|
||||
trackLoginClick("enter details")
|
||||
}}
|
||||
redirectTo={loginPathname}
|
||||
>
|
||||
{intl.formatMessage({
|
||||
id: "enterDetails.joinScandicFriendsCard.loginButtonText",
|
||||
defaultMessage: "Log in",
|
||||
})}
|
||||
</LoginButton>
|
||||
|
||||
<div className={styles.terms}>
|
||||
<Footnote color="uiTextPlaceholder">
|
||||
|
||||
Reference in New Issue
Block a user