[Feature]Booking Embed (#2227)

This commit is contained in:
Hariom Balhara authored and GitHub committed 2022-03-31 09:45:47 +01:00
1 parent 4e9c3be598
commit 4a58da62d6
39 files changed
+1740 -22

No files matched your search

@@ -0,0 +1,13 @@
import { useEffect, useState } from "react";
import EmbedSnippet from "@calcom/embed-snippet";
export default function useEmbed(embedJsUrl?: string) {
const [globalCal, setGlobalCal] = useState<ReturnType<typeof EmbedSnippet>>();
useEffect(() => {
setGlobalCal(() => {
return EmbedSnippet(embedJsUrl);
});
}, []);
return globalCal;
}