[Feature]Booking Embed (#2227)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user