Add eventTypeSelected event (#8894)

pull/8769/head^2
Hariom Balhara 2023-05-15 12:00:08 +05:30 committed by GitHub
parent 69bc12187e
commit 0ca0cc3265
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -4,7 +4,7 @@ import Link from "next/link";
import { useRouter } from "next/router";
import { useEffect } from "react";
import { useIsEmbed } from "@calcom/embed-core/embed-iframe";
import { sdkActionManager, useIsEmbed } from "@calcom/embed-core/embed-iframe";
import EventTypeDescription from "@calcom/features/eventtypes/components/EventTypeDescription";
import { CAL_URL } from "@calcom/lib/constants";
import { getPlaceholderAvatar } from "@calcom/lib/defaultAvatarImage";
@ -67,6 +67,11 @@ function TeamPage({ team, isUnpublished }: TeamPageProps) {
<div className="px-6 py-4 ">
<Link
href={`/team/${team.slug}/${type.slug}`}
onClick={async () => {
sdkActionManager?.fire("eventTypeSelected", {
eventType: type,
});
}}
data-testid="event-type-link"
className="flex justify-between">
<div className="flex-shrink">