Merged in fix/BOOK-486-hotjar (pull request #3046)

fix(BOOK-486): suppress hotjar firstname lastname and initials

* fix(BOOK-486): suppress hotjar firstname lastname and initials


Approved-by: Joakim Jäderberg
Approved-by: Anton Gunnarsson
This commit is contained in:
Bianca Widstam
2025-10-31 07:26:11 +00:00
parent 0e598e53e8
commit e2aeada23e
5 changed files with 17 additions and 12 deletions

View File

@@ -88,7 +88,7 @@ export function UserMenu({ isMobile = false }: { isMobile?: boolean }) {
/> />
{isMobile ? null : ( {isMobile ? null : (
<Typography variant="Body/Supporting text (caption)/smBold"> <Typography variant="Body/Supporting text (caption)/smBold">
<span> <span data-hj-suppress>
{firstName ?? session.data?.user?.email} {firstName ?? session.data?.user?.email}
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */} {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{` ${lastName}`} {` ${lastName}`}
@@ -162,7 +162,7 @@ function UserMenuContent({
<div> <div>
{isMobile && ( {isMobile && (
<Typography variant={"Title/Subtitle/md"}> <Typography variant={"Title/Subtitle/md"}>
<h3> <h3 data-hj-suppress>
{intl.formatMessage( {intl.formatMessage(
{ {
id: "partnerSas.mobileMenu.greeting", id: "partnerSas.mobileMenu.greeting",

View File

@@ -26,7 +26,7 @@ export default async function UserBaseInfo({ user }: UserBaseInfoProps) {
/> />
<div> <div>
<Typography variant="Title/smLowCase"> <Typography variant="Title/smLowCase">
<h3 className={styles.fullName}> <h3 data-hj-suppress className={styles.fullName}>
{user.firstName} {user.lastName} {user.firstName} {user.lastName}
</h3> </h3>
</Typography> </Typography>

View File

@@ -8,7 +8,7 @@ import Caption from "@scandic-hotels/design-system/Caption"
import { Divider } from "@scandic-hotels/design-system/Divider" import { Divider } from "@scandic-hotels/design-system/Divider"
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
import Link from "@scandic-hotels/design-system/OldDSLink" import Link from "@scandic-hotels/design-system/OldDSLink"
import Subtitle from "@scandic-hotels/design-system/Subtitle" import { Typography } from "@scandic-hotels/design-system/Typography"
import { trpc } from "@scandic-hotels/trpc/client" import { trpc } from "@scandic-hotels/trpc/client"
import useLang from "@/hooks/useLang" import useLang from "@/hooks/useLang"
@@ -47,12 +47,17 @@ export default function MyPagesMenuContent({
<FocusLock returnFocus={true}> <FocusLock returnFocus={true}>
<nav className={styles.myPagesMenuContent}> <nav className={styles.myPagesMenuContent}>
<div className={introClassName}> <div className={introClassName}>
<Subtitle type="two" className={styles.userName}> <Typography variant="Title/Subtitle/md" className={styles.userName}>
{intl.formatMessage( <p data-hj-suppress>
{ id: "myPages.hiFirstName", defaultMessage: "Hi {firstName}!" }, {intl.formatMessage(
{ firstName: user.firstName } {
)} id: "myPages.hiFirstName",
</Subtitle> defaultMessage: "Hi {firstName}!",
},
{ firstName: user.firstName }
)}
</p>
</Typography>
{membershipLevel && membershipPoints ? ( {membershipLevel && membershipPoints ? (
<Caption className={styles.friendTypeWrapper}> <Caption className={styles.friendTypeWrapper}>
<span className={styles.friendType}>{membershipLevel.name}</span> <span className={styles.friendType}>{membershipLevel.name}</span>

View File

@@ -179,7 +179,7 @@ export default function GuestDetails({
)} )}
<div className={styles.guest}> <div className={styles.guest}>
<Typography variant="Body/Paragraph/mdBold"> <Typography variant="Body/Paragraph/mdBold">
<p> <p data-hj-suppress>
{guest.firstName} {guest.lastName} {guest.firstName} {guest.lastName}
</p> </p>
</Typography> </Typography>

View File

@@ -25,7 +25,7 @@ export function Avatar({
variant={size === 'lg' ? 'Title/Overline/sm' : 'Tag/sm'} variant={size === 'lg' ? 'Title/Overline/sm' : 'Tag/sm'}
className={variants.initials} className={variants.initials}
> >
<span>{initials}</span> <span data-hj-suppress>{initials}</span>
</Typography> </Typography>
) : ( ) : (
<MaterialIcon icon="person" color="Icon/Inverted" size={iconSize} /> <MaterialIcon icon="person" color="Icon/Inverted" size={iconSize} />