@kiwicom/orbit-components
Version:
Orbit-components is a React component library which provides developers with the easiest possible way of building Kiwi.com’s products.
13 lines (11 loc) • 352 B
JavaScript
import { useContext, useEffect } from "react";
import { ModalContext } from "../ModalContext";
const useModalContextFunctions = () => {
const {
callContextFunctions
} = useContext(ModalContext);
useEffect(() => {
if (callContextFunctions) callContextFunctions();
}, [callContextFunctions]);
};
export default useModalContextFunctions;