chore: useIsEmbed hook
This commit is contained in:
parent
2caf18fc86
commit
41100d6943
|
@ -4,6 +4,7 @@ import { useCallback, useMemo } from "react";
|
|||
import { shallow } from "zustand/shallow";
|
||||
|
||||
import dayjs from "@calcom/dayjs";
|
||||
import { useIsEmbed } from "@calcom/embed-core/embed-iframe";
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { BookerLayouts } from "@calcom/prisma/zod-utils";
|
||||
|
@ -168,7 +169,7 @@ const LayoutToggle = ({
|
|||
layout: string;
|
||||
enabledLayouts?: BookerLayouts[];
|
||||
}) => {
|
||||
const isEmbed = typeof window !== "undefined" && window?.isEmbed?.();
|
||||
const isEmbed = useIsEmbed();
|
||||
|
||||
const { t } = useLocale();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user