@b2bfinance/products-embed
Version:
products-embed React component
14 lines (10 loc) • 346 B
JavaScript
import { useContext } from "react";
import EmbedContext from "../EmbedContext";
var useEmbedDispatch = function useEmbedDispatch() {
var context = useContext(EmbedContext);
if (!context) {
throw new Error("useEmbedDispatch must be used within EmbedContext.Provider");
}
return context.dispatch;
};
export default useEmbedDispatch;