chore: small changes for platform booker embed (#18159)
This commit is contained in:
1 parent
ef830f11ec
commit
851d96423b
4 files changed
+14
-8
No files matched your search
@@ -39,11 +39,12 @@ export const EventMembers = ({ schedulingType, users, profile, entity }: EventMe
|
||||
: [
|
||||
{
|
||||
// We don't want booker to be able to see the list of other users or teams inside the embed
|
||||
href: isEmbed
|
||||
? null
|
||||
: entity.teamSlug
|
||||
? getTeamUrlSync({ orgSlug: entity.orgSlug, teamSlug: entity.teamSlug })
|
||||
: getBookerBaseUrlSync(entity.orgSlug),
|
||||
href:
|
||||
isEmbed || isPlatform
|
||||
? null
|
||||
: entity.teamSlug
|
||||
? getTeamUrlSync({ orgSlug: entity.orgSlug, teamSlug: entity.teamSlug })
|
||||
: getBookerBaseUrlSync(entity.orgSlug),
|
||||
image: entity.logoUrl ?? profile.image ?? "",
|
||||
alt: entity.name ?? profile.name ?? "",
|
||||
title: entity.name ?? profile.name ?? "",
|
||||
|
||||
@@ -6,12 +6,15 @@ import { BookerPlatformWrapper } from "../booker/BookerPlatformWrapper";
|
||||
import { CalProvider } from "../cal-provider/CalProvider";
|
||||
|
||||
export const BookerEmbed = (
|
||||
props: BookerPlatformWrapperAtomPropsForIndividual | BookerPlatformWrapperAtomPropsForTeam
|
||||
props:
|
||||
| (BookerPlatformWrapperAtomPropsForIndividual & { organizationId?: undefined })
|
||||
| (BookerPlatformWrapperAtomPropsForTeam & { organizationId?: number })
|
||||
) => {
|
||||
return (
|
||||
<CalProvider
|
||||
clientId={import.meta.env.VITE_BOOKER_EMBED_OAUTH_CLIENT_ID}
|
||||
isEmbed={true}
|
||||
organizationId={props?.organizationId}
|
||||
options={{
|
||||
apiUrl: import.meta.env.VITE_BOOKER_EMBED_API_URL,
|
||||
}}>
|
||||
|
||||
@@ -132,7 +132,9 @@ export const BookerPlatformWrapper = (
|
||||
setSelectedDuration(props.duration ?? null);
|
||||
}, [props.duration]);
|
||||
|
||||
setOrg(props.entity?.orgSlug ?? null);
|
||||
useEffect(() => {
|
||||
setOrg(props.entity?.orgSlug ?? null);
|
||||
}, [props.entity?.orgSlug]);
|
||||
|
||||
const isDynamic = useMemo(() => {
|
||||
return getUsernameList(username ?? "").length > 1;
|
||||
|
||||
@@ -16,7 +16,7 @@ export const AtomsWrapper = ({
|
||||
return (
|
||||
<div
|
||||
dir={options?.readingDirection ?? "ltr"}
|
||||
className={classNames(`${CALCOM_ATOMS_WRAPPER_CLASS} m-0 w-auto p-0`, customClassName)}>
|
||||
className={classNames(`${CALCOM_ATOMS_WRAPPER_CLASS} m-0 w-auto bg-transparent p-0`, customClassName)}>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user