Compare commits

...
9 Commits
Author SHA1 Message Date
Alex van Andel 6ac19e8307 v3.0.0.1
release.yml / release (push) Canceled after 0s
2023-06-16 12:48:20 +02:00
Hariom Balhara 344241cfbf fix: New Booker Rewrites (#9557)
* Solve the problem using Next.config.js only

* Debug

* Avoid infinite rewritees

* Apply suggestions from code review

* Apply suggestions from code review

* Remove stale comments

* Update packages/embeds/embed-core/src/embed-iframe.ts
2023-06-16 12:31:57 +02:00
Carina WollendorferandCarinaWolli 66ebf18fa9 add team slug to team event link (#9558)
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
2023-06-16 11:05:47 +02:00
Crowdin Bot e6d6f3317e New Crowdin translations by Github Action 2023-06-16 08:38:03 +00:00
Carina WollendorferandCarinaWolli 55f66e6bcd remove slash (#9556)
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
2023-06-16 08:37:06 +00:00
Crowdin Bot 22e2b0a6a9 New Crowdin translations by Github Action 2023-06-16 06:27:50 +00:00
sydwardrae e24f3828cb Spelling chore common.json (#9550)
Fixed occured to occurred
2023-06-16 08:26:59 +02:00
Crowdin Bot 70f5bdc499 New Crowdin translations by Github Action 2023-06-15 22:38:02 +00:00
zomars 8731a39c3c fix: api build 2023-06-15 15:36:59 -07:00
31 changed files with 93 additions and 104 deletions
+1 -1
View File
@@ -123,7 +123,7 @@ async function handler(req: NextApiRequest) {
const { currentOrgDomain, isValidOrgDomain } = orgDomainConfig(req.headers.host ?? "");
if (!teamId)
return getUserAvailability({
orgSlug: isValidOrgDomain ? currentOrgDomain : undefined,
orgSlug: isValidOrgDomain ? currentOrgDomain || undefined : undefined,
username,
dateFrom,
dateTo,
-18
View File
@@ -12,21 +12,10 @@ const middleware: NextMiddleware = async (req) => {
const url = req.nextUrl;
const requestHeaders = new Headers(req.headers);
const { currentOrgDomain, isValidOrgDomain } = orgDomainConfig(req.headers.get("host") ?? "");
const isEmbedRequest = typeof url.searchParams.get("embed") === "string";
/**
* We are using env variable to toggle new-booker because using flags would be an unnecessary delay for booking pages
* Also, we can't easily identify the booker page requests here(to just fetch the flags for those requests)
*/
// Enable New Booker for All but embed Requests
if (process.env.NEW_BOOKER_ENABLED_FOR_NON_EMBED === "1" && !isEmbedRequest) {
requestHeaders.set("new-booker-enabled", "1");
}
// Enable New Booker for Embed Requests
if (process.env.NEW_BOOKER_ENABLED_FOR_EMBED === "1" && isEmbedRequest) {
requestHeaders.set("new-booker-enabled", "1");
}
// Make sure we are in the presence of an organization
if (isValidOrgDomain && url.pathname === "/") {
@@ -79,13 +68,6 @@ const middleware: NextMiddleware = async (req) => {
}
}
// Ensure that embed query param is there in when /embed is added.
// query param is the way in which client side code knows that it is in embed mode.
if (url.pathname.endsWith("/embed") && typeof url.searchParams.get("embed") !== "string") {
url.searchParams.set("embed", "");
return NextResponse.redirect(url);
}
// Don't 404 old routing_forms links
if (url.pathname.startsWith("/apps/routing_forms")) {
url.pathname = url.pathname.replace("/apps/routing_forms", "/apps/routing-forms");
+76 -54
View File
@@ -183,7 +183,12 @@ const nextConfig = {
return config;
},
async rewrites() {
return [
// .* matches / as well(Note: *(i.e wildcard) doesn't match / but .*(i.e. RegExp) does)
// It would match /free/30min but not /bookings/upcoming because 'bookings' is an item in pages
// It would also not match /free/30min/embed because we are ensuring just two slashes
const userTypeRouteRegExp = `/:user((?!${pages.join("|")})[^/]*)/:type`;
let rewrites = [
{
source: "/org/:slug",
destination: "/team/:slug",
@@ -219,68 +224,85 @@ const nextConfig = {
source: "/cancel/:path*",
destination: "/booking/:path*",
},
// Keep cookie based booker enabled just in case we disable new-booker globally
...[
{
source: userTypeRouteRegExp,
destination: "/new-booker/:user/:type",
has: [{ type: "cookie", key: "new-booker-enabled" }],
},
{
source: "/team/:slug/:type",
destination: "/new-booker/team/:slug/:type",
has: [{ type: "cookie", key: "new-booker-enabled" }],
},
{
source: "/d/:link/:slug",
destination: "/new-booker/d/:link/:slug",
has: [{ type: "cookie", key: "new-booker-enabled" }],
},
],
// Keep cookie based booker enabled to test new-booker embed in production
...[
{
source: `/:user((?!${pages.join("|")}).*)/:type/embed`,
destination: "/new-booker/:user/:type/embed",
has: [{ type: "cookie", key: "new-booker-enabled" }],
},
{
source: "/team/:slug/:type/embed",
destination: "/new-booker/team/:slug/:type/embed",
has: [{ type: "cookie", key: "new-booker-enabled" }],
},
],
/* TODO: have these files being served from another deployment or CDN {
source: "/embed/embed.js",
destination: process.env.NEXT_PUBLIC_EMBED_LIB_URL?,
}, */
/**
* Header allows us to enable new-booker using middleware which uses env variables to enable/disable new booker
*/
{
source: `/:user((?!${pages.join("|")}).*)/:type`,
destination: "/new-booker/:user/:type",
has: [{ type: "header", key: "new-booker-enabled" }],
},
{
source: `/:user((?!${pages.join("|")}).*)/:type/embed`,
destination: "/new-booker/:user/:type/embed",
has: [{ type: "header", key: "new-booker-enabled" }],
},
{
source: "/team/:slug/:type",
destination: "/new-booker/team/:slug/:type",
has: [{ type: "header", key: "new-booker-enabled" }],
},
{
source: "/team/:slug/:type/embed",
destination: "/new-booker/team/:slug/:type/embed",
has: [{ type: "header", key: "new-booker-enabled" }],
},
{
source: "/d/:link/:slug",
destination: "/new-booker/d/:link/:slug",
has: [{ type: "header", key: "new-booker-enabled" }],
},
/**
* Enables new booker using cookie. It works even if NEW_BOOKER_ENABLED_FOR_NON_EMBED, NEW_BOOKER_ENABLED_FOR_EMBED are disabled
*/
{
source: `/:user((?!${pages.join("|")}).*)/:type`,
destination: "/new-booker/:user/:type",
has: [{ type: "cookie", key: "new-booker-enabled" }],
},
{
source: `/:user((?!${pages.join("|")}).*)/:type/embed`,
destination: "/new-booker/:user/:type/embed",
has: [{ type: "cookie", key: "new-booker-enabled" }],
},
{
source: "/team/:slug/:type",
destination: "/new-booker/team/:slug/:type",
has: [{ type: "cookie", key: "new-booker-enabled" }],
},
{
source: "/team/:slug/:type/embed",
destination: "/new-booker/team/:slug/:type/embed",
has: [{ type: "cookie", key: "new-booker-enabled" }],
},
{
source: "/d/:link/:slug",
destination: "/new-booker/d/:link/:slug",
has: [{ type: "cookie", key: "new-booker-enabled" }],
},
];
// Enable New Booker for all Embed Requests
if (process.env.NEW_BOOKER_ENABLED_FOR_EMBED === "1") {
console.log("Enabling New Booker for Embed");
rewrites.push(
...[
{
source: `/:user((?!${pages.join("|")}).*)/:type/embed`,
destination: "/new-booker/:user/:type/embed",
},
{
source: "/team/:slug/:type/embed",
destination: "/new-booker/team/:slug/:type/embed",
},
]
);
}
// Enable New Booker for All but embed Requests
if (process.env.NEW_BOOKER_ENABLED_FOR_NON_EMBED === "1") {
console.log("Enabling New Booker for Non-Embed");
rewrites.push(
...[
{
source: userTypeRouteRegExp,
destination: "/new-booker/:user/:type",
},
{
source: "/team/:slug/:type",
destination: "/new-booker/team/:slug/:type",
},
{
source: "/d/:link/:slug",
destination: "/new-booker/d/:link/:slug",
},
]
);
}
return rewrites;
},
async headers() {
return [
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@calcom/web",
"version": "3.0.0",
"version": "3.0.0.1",
"private": true,
"scripts": {
"analyze": "ANALYZE=true next build",
@@ -1653,7 +1653,6 @@
"spot_popular_event_types_description": "تعرف أي أنواع من الأحداث لديك تتلقى أكبر عدد من النقرات والحجوزات",
"no_responses_yet": "لا توجد ردود بعد",
"this_will_be_the_placeholder": "سيكون هذا هو العنصر النائب",
"error_booking_event": "حدث خطأ عند حجز الحدث، الرجاء تحديث الصفحة والمحاولة ثانيةً",
"timeslot_missing_title": "لم يتم تحديد مساحة زمنية",
"timeslot_missing_description": "الرجاء تحديد فترة زمنية لحجز الحدث.",
"timeslot_missing_cta": "حدد الوقت",
@@ -1653,7 +1653,6 @@
"spot_popular_event_types_description": "Zjistěte, které typy vašich událostí získávají nejvíce kliknutí a rezervací",
"no_responses_yet": "Zatím žádné odpovědi",
"this_will_be_the_placeholder": "Toto bude zástupný znak",
"error_booking_event": "Při rezervaci události došlo k chybě, obnovte prosím stránku a zkuste to znovu",
"timeslot_missing_title": "Nebyl vybrán žádný časový slot",
"timeslot_missing_description": "Vyberte časový slot, aby mohla být událost zaregistrována.",
"timeslot_missing_cta": "Vybrat časový slot",
@@ -1653,7 +1653,6 @@
"spot_popular_event_types_description": "Sehen Sie, welche Ihrer Ereignistypen die meisten Klicks und Buchungen erhalten",
"no_responses_yet": "Noch keine Antworten",
"this_will_be_the_placeholder": "Dies wird der Platzhalter sein",
"error_booking_event": "Bei der Buchung dieses Termins ist ein Fehler aufgetreten, bitte aktualisieren Sie die Seite und versuchen Sie es erneut",
"timeslot_missing_title": "Kein Zeitfenster ausgewählt",
"timeslot_missing_description": "Bitte wählen Sie einen Zeitraum aus, um den Termin zu buchen.",
"timeslot_missing_cta": "Zeitfenster auswählen",
@@ -1709,7 +1709,7 @@
"no_responses_yet": "No responses yet",
"no_routes_defined": "No routes defined",
"this_will_be_the_placeholder": "This will be the placeholder",
"error_booking_event": "An error occured when booking the event, please refresh the page and try again",
"error_booking_event": "An error occurred when booking the event, please refresh the page and try again",
"timeslot_missing_title": "No timeslot selected",
"timeslot_missing_description": "Please select a timeslot to book the event.",
"timeslot_missing_cta": "Select timeslot",
@@ -1653,7 +1653,6 @@
"spot_popular_event_types_description": "Consulte cuál de sus tipos de eventos están recibiendo más clics y reservas",
"no_responses_yet": "Aún no hay respuestas",
"this_will_be_the_placeholder": "Este será el marcador de posición",
"error_booking_event": "Ocurrió un error al reservar el evento, actualice la página e intente nuevamente",
"timeslot_missing_title": "No hay intervalo de tiempo seleccionado",
"timeslot_missing_description": "Seleccione un intervalo de tiempo para reservar el evento.",
"timeslot_missing_cta": "Seleccionar intervalo de tiempo",
@@ -241,7 +241,8 @@
"done": "Terminé",
"all_done": "Terminé !",
"all_apps": "Toutes",
"all": "Toutes",
"all": "Tous",
"yours": "Les vôtres",
"available_apps": "Applications disponibles",
"check_email_reset_password": "Vérifiez vos e-mails. Nous vous avons envoyé un lien pour réinitialiser votre mot de passe.",
"finish": "Terminer",
@@ -903,7 +904,7 @@
"the_infrastructure_plan": "Le plan d'infrastructure est basé sur l'utilisation et propose des réductions adaptées aux startups.",
"prisma_studio_tip": "Créer un compte via Prisma Studio",
"prisma_studio_tip_description": "Découvrez comment configurer votre premier utilisateur",
"contact_sales": "Contacter les ventes",
"contact_sales": "Contacter le service commercial",
"error_404": "Erreur 404",
"default": "Par défaut",
"set_to_default": "Définir par défaut",
@@ -1667,7 +1667,6 @@
"spot_popular_event_types_description": "צפה איזה ארועים מקבלים הכי הרבה גישות ותזמונים",
"no_responses_yet": "אין עדיין תגובות",
"this_will_be_the_placeholder": "זה יהיה הממלא מקום",
"error_booking_event": "אירעה שגיאה בעת הזמנת האירוע, רענן/י את הדף ונסה/י שוב",
"timeslot_missing_title": "לא נבחר חלון זמן",
"timeslot_missing_description": "כדי להזמין את האירוע, יש לבחור חלון זמן.",
"timeslot_missing_cta": "חלון הזמן שנבחר",
@@ -1689,7 +1689,6 @@
"no_responses_yet": "Per ora non ci sono risposte",
"no_routes_defined": "Nessun percorso definito",
"this_will_be_the_placeholder": "Questo sarà il segnaposto",
"error_booking_event": "Si è verificato un errore durante la prenotazione dell'evento. Aggiornare la pagina e riprovare",
"timeslot_missing_title": "Nessuna fascia oraria selezionata",
"timeslot_missing_description": "Selezionare una fascia oraria per prenotare l'evento.",
"timeslot_missing_cta": "Seleziona fascia oraria",
@@ -1653,7 +1653,6 @@
"spot_popular_event_types_description": "どのイベントの種類が最もクリックされ、予約されているのかを確認します",
"no_responses_yet": "回答はまだありません",
"this_will_be_the_placeholder": "これがプレースホルダーになります",
"error_booking_event": "イベントを予約する際にエラーが発生しました。ページを再読み込みして、もう一度お試しください",
"timeslot_missing_title": "時間帯が選択されていません",
"timeslot_missing_description": "イベントを予約するには時間帯を選んでください。",
"timeslot_missing_cta": "時間帯を選ぶ",
@@ -1654,7 +1654,6 @@
"spot_popular_event_types_description": "어떤 이벤트 타입이 가장 많은 클릭과 예약을 받고 있는지 확인",
"no_responses_yet": "아직 응답 없음",
"this_will_be_the_placeholder": "이것은 자리 표시자가 됩니다",
"error_booking_event": "이벤트를 예약하는 도중 오류가 발생했습니다. 페이지를 새로고침한 후 다시 시도해주세요.",
"timeslot_missing_title": "시간대가 선택되지 않았습니다",
"timeslot_missing_description": "이벤트를 예약 할 시간대를 선택해주세요.",
"timeslot_missing_cta": "시간대 선택",
@@ -1653,7 +1653,6 @@
"spot_popular_event_types_description": "Bekijk welke van uw gebeurtenistypen de meeste kliks en boekingen ontvangen",
"no_responses_yet": "Nog geen reacties",
"this_will_be_the_placeholder": "Dit wordt de plaatshouder",
"error_booking_event": "Er is een fout opgetreden bij het boeken van de gebeurtenis, vernieuw de pagina en probeer het opnieuw",
"timeslot_missing_title": "Geen tijdslot geselecteerd",
"timeslot_missing_description": "Selecteer een tijdslot om de gebeurtenis te boeken.",
"timeslot_missing_cta": "Tijdslot selecteren",
@@ -1653,7 +1653,6 @@
"spot_popular_event_types_description": "Zobacz, które typy wydarzeń są najczęściej klikane i rezerwowane",
"no_responses_yet": "Nie ma jeszcze odpowiedzi",
"this_will_be_the_placeholder": "To będzie symbol zastępczy",
"error_booking_event": "Podczas rezerwacji wydarzenia wystąpił błąd, odśwież stronę i spróbuj ponownie.",
"timeslot_missing_title": "Nie wybrano przedziału czasowego",
"timeslot_missing_description": "Wybierz przedział czasowy, aby zarezerwować wydarzenie.",
"timeslot_missing_cta": "Wybierz przedział czasowy",
@@ -1653,7 +1653,6 @@
"spot_popular_event_types_description": "Veja quais tipos de eventos estão recebendo a maioria dos cliques e reservas",
"no_responses_yet": "Sem respostas por enquanto",
"this_will_be_the_placeholder": "Este será o espaço reservado",
"error_booking_event": "Ocorreu um erro ao reservar o evento, atualize a página e tente novamente",
"timeslot_missing_title": "Nenhuma alocação de tempo selecionada",
"timeslot_missing_description": "Selecione uma alocação de tempo para reservar o evento.",
"timeslot_missing_cta": "Selecione a alocação de tempo",
@@ -1653,7 +1653,6 @@
"spot_popular_event_types_description": "Veja quais os tipos de eventos que estão a receber mais cliques e reservas",
"no_responses_yet": "Ainda sem respostas",
"this_will_be_the_placeholder": "Isto será o marcador de posição",
"error_booking_event": "Ocorreu um erro ao reservar o evento. Atualize a página e tente novamente",
"timeslot_missing_title": "Nenhuma janela horária selecionada",
"timeslot_missing_description": "Selecione uma janela horária para reservar o evento.",
"timeslot_missing_cta": "Selecionar janela horária",
@@ -1653,7 +1653,6 @@
"spot_popular_event_types_description": "Vedeți care dintre tipurile de evenimente primesc cele mai multe clicuri și rezervări",
"no_responses_yet": "Nu există încă răspunsuri",
"this_will_be_the_placeholder": "Acesta va fi substituentul",
"error_booking_event": "A survenit o eroare la rezervarea evenimentului. Reîmprospătați pagina și încercați din nou",
"timeslot_missing_title": "Nu există niciun interval de timp selectat",
"timeslot_missing_description": "Selectați un interval de timp pentru a rezerva evenimentul.",
"timeslot_missing_cta": "Selectare interval de timp",
@@ -1653,7 +1653,6 @@
"spot_popular_event_types_description": "Узнайте, какие типы событий собирают больше всего кликов и бронирований",
"no_responses_yet": "Ответов пока нет",
"this_will_be_the_placeholder": "Это текст-заполнитель",
"error_booking_event": "При бронировании события произошла ошибка. Обновите страницу и повторите попытку",
"timeslot_missing_title": "Не выбран интервал времени",
"timeslot_missing_description": "Чтобы забронировать событие, выберите интервал времени.",
"timeslot_missing_cta": "Выбрать интервал времени",
@@ -1686,7 +1686,6 @@
"no_responses_yet": "Još uvek nema odgovora",
"no_routes_defined": "Nema definisanih ruta",
"this_will_be_the_placeholder": "Ovo će biti čuvar mesta",
"error_booking_event": "Došlo je do greške prilikom zakazivanja događaja, osvežite stranicu i pokušajte ponovo",
"timeslot_missing_title": "Nisu izabrani termini",
"timeslot_missing_description": "Izaberite termin da biste zakazali događaj.",
"timeslot_missing_cta": "Izaberite termin",
@@ -1653,7 +1653,6 @@
"spot_popular_event_types_description": "Se vilka av dina händelsetyper som får flest klick och bokningar",
"no_responses_yet": "Inga svar ännu",
"this_will_be_the_placeholder": "Det här blir platshållaren",
"error_booking_event": "Ett fel uppstod när du bokade evenemanget, uppdatera sidan och försök igen",
"timeslot_missing_title": "Ingen tidslucka vald",
"timeslot_missing_description": "Välj en tidslucka för att boka evenemanget.",
"timeslot_missing_cta": "Välj tidslucka",
@@ -1653,7 +1653,6 @@
"spot_popular_event_types_description": "Hangi etkinlik türünüzün en çok tıklandığını ve rezervasyon aldığını görün",
"no_responses_yet": "Henüz yanıt yok",
"this_will_be_the_placeholder": "Bu, yer tutucu olacak",
"error_booking_event": "Etkinlik rezervasyonu yapılırken bir hata oluştu, lütfen sayfayı yenileyerek tekrar deneyin",
"timeslot_missing_title": "Zaman aralığı seçilmedi",
"timeslot_missing_description": "Etkinlik rezervasyonu için lütfen bir zaman aralığı seçin.",
"timeslot_missing_cta": "Zaman aralığını seçin",
@@ -1653,7 +1653,6 @@
"spot_popular_event_types_description": "Дізнайтеся, які типи заходів мають найбільшу кількість переходів і бронювань",
"no_responses_yet": "Поки немає відповідей",
"this_will_be_the_placeholder": "Це заповнювач",
"error_booking_event": "Сталася помилка під час бронювання заходу, оновіть сторінку й повторіть спробу",
"timeslot_missing_title": "Не вибрано проміжок часу",
"timeslot_missing_description": "Виберіть проміжок часу для бронювання заходу.",
"timeslot_missing_cta": "Вибрати проміжок часу",
@@ -1653,7 +1653,6 @@
"spot_popular_event_types_description": "Xem loại sự kiện nào của bạn nhận được nhiều lần nhấp chuột và nhiều lịch hẹn nhất",
"no_responses_yet": "Chưa có hồi đáp",
"this_will_be_the_placeholder": "Đây sẽ là mã giữ chỗ",
"error_booking_event": "Có lỗi khi đặt lịch sự kiện, hãy làm mới trang rồi thử lại",
"timeslot_missing_title": "Chưa chọn suất thời gian nào",
"timeslot_missing_description": "Vui lòng chọn một suất thời gian để đặt lịch sự kiện.",
"timeslot_missing_cta": "Chọn suất thời gian",
@@ -1667,7 +1667,6 @@
"spot_popular_event_types_description": "查看获得最多点击和预约的活动类型",
"no_responses_yet": "尚无回复",
"this_will_be_the_placeholder": "这将是占位符",
"error_booking_event": "预订活动时发生错误,请刷新页面并重试",
"timeslot_missing_title": "未选择时间段",
"timeslot_missing_description": "请选择要预约活动的时间段。",
"timeslot_missing_cta": "选择时间段",
@@ -1653,7 +1653,6 @@
"spot_popular_event_types_description": "查看哪種活動類型的點閱次數及預約次數最多",
"no_responses_yet": "還沒有回應",
"this_will_be_the_placeholder": "此處會是佔位符",
"error_booking_event": "預約活動時發生錯誤,請重新整理頁面然後再試一次",
"timeslot_missing_title": "未選擇任何時段",
"timeslot_missing_description": "請選擇要預約活動的時段。",
"timeslot_missing_cta": "選擇時段",
@@ -5,7 +5,10 @@ export default function EmbedInitIframe() {
return;
}
const embedNameSpaceFromQueryParam = new URL(document.URL).searchParams.get("embed");
const url = new URL(document.URL);
const embedNameSpaceFromQueryParam = url.searchParams.get("embed");
const hasEmbedPath = url.pathname.endsWith("/embed");
const defaultNamespace = "";
// Namespace is initially set in query param `embed` but the query param might get lost during soft navigation
// So, we also check for the namespace in `window.name` which is set when iframe is created by embed.ts and persists for the duration of iframe's life
@@ -17,6 +20,8 @@ export default function EmbedInitIframe() {
? embedNameSpaceFromQueryParam
: window.name.includes("cal-embed=")
? window.name.replace(/cal-embed=(.*)/, "$1").trim()
: hasEmbedPath
? defaultNamespace // If query param is not there but /embed is used then assume default namespace.
: null;
window.isEmbed = () => {
@@ -2,7 +2,6 @@ import { useRouter } from "next/router";
import type { CSSProperties } from "react";
import { useState, useEffect } from "react";
import embedInit from "@calcom/embed-core/embed-iframe-init";
import type { BookerStore } from "@calcom/features/bookings/Booker/store";
import type { BookerLayouts } from "@calcom/prisma/zod-utils";
@@ -439,8 +438,6 @@ function keepParentInformedAboutDimensionChanges() {
if (isBrowser) {
log("Embed SDK loaded", { isEmbed: window?.isEmbed?.() || false });
// Exposes certain global variables/fns that are used by the app to get interface with the embed.
embedInit();
const url = new URL(document.URL);
embedStore.theme = window?.getEmbedTheme?.();
if (url.searchParams.get("prerender") !== "true" && window?.isEmbed?.()) {
+4 -1
View File
@@ -2,9 +2,12 @@
* @file
* This module is supposed to instantiate the SDK with appropriate namespace
*/
import embedInit from "@calcom/embed-core/embed-iframe-init";
import { SdkActionManager } from "./sdk-action-manager";
export let sdkActionManager: SdkActionManager | null = null;
if (typeof window !== "undefined") {
sdkActionManager = new SdkActionManager(new URL(document.URL).searchParams.get("embed"));
embedInit();
sdkActionManager = new SdkActionManager(window.getEmbedNamespace());
}
@@ -226,7 +226,7 @@ export const getByViewerHandler = async ({ ctx }: GetByViewerOptions) => {
image: `${CAL_URL}/team/${membership.team.slug}/avatar.png`,
slug: membership.team.slug
? !membership.team.parentId
? `/team`
? `team/${membership.team.slug}`
: "" + membership.team.slug
: null,
},