import {useContext} from 'react';
import {BasicModalContext} from '../context';

export const useModalContext = () => {
    const state = useContext(BasicModalContext);
    if (!state) {
        throw new Error('You are outside of this context universe');
    }

    return state;
};
