@hoosei/voxweave-react
Version:
A customizable and interactive voice UI component for React applications
3 lines (2 loc) • 738 B
JavaScript
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),t=require("./index5.js"),i=require("react/jsx-runtime"),n=r.createContext(null);function a(){const o=r.useContext(n);if(o===null)throw new Error("useVoxweave must be used within a VoxweaveProvider");return o}function u({children:o,config:e}){return r.useEffect(()=>{(async()=>{typeof window<"u"&&(e.development?await t.configureVoxweave({licenseKey:"vox_admin_development_override",apiUrl:e.apiUrl||"http://localhost:4200/api"}):await t.configureVoxweave({licenseKey:e.licenseKey,apiUrl:e.apiUrl}))})()},[e]),i.jsx(n.Provider,{value:e,children:o})}exports.VoxweaveProvider=u;exports.useVoxweave=a;
//# sourceMappingURL=index3.js.map