Feat(SW-1993) tracking mystay * feat(SW-1993) added trackEvent for cancelStay and mypagelink * feat(SW-1993) implement trackCancelStay and trackMyStayPageLink Approved-by: Linus Flood
36 lines
779 B
TypeScript
36 lines
779 B
TypeScript
"use client"
|
|
|
|
import { useIntl } from "react-intl"
|
|
|
|
import { CalendarAddIcon } from "@/components/Icons"
|
|
import Button from "@/components/TempDesignSystem/Button"
|
|
import { trackMyStayPageLink } from "@/utils/tracking"
|
|
|
|
import styles from "../actionPanel.module.css"
|
|
|
|
export default function AddToCalendarButton({
|
|
onPress,
|
|
}: {
|
|
onPress: () => void
|
|
}) {
|
|
const intl = useIntl()
|
|
|
|
const handleAddToCalendar = () => {
|
|
trackMyStayPageLink("add to calendar")
|
|
onPress()
|
|
}
|
|
|
|
return (
|
|
<Button
|
|
variant="icon"
|
|
intent="text"
|
|
theme="base"
|
|
className={styles.button}
|
|
onPress={handleAddToCalendar}
|
|
>
|
|
{intl.formatMessage({ id: "Add to calendar" })}
|
|
<CalendarAddIcon width={24} height={24} color="burgundy" />
|
|
</Button>
|
|
)
|
|
}
|