UNPKG

roko-date-picker

Version:
12 lines (11 loc) 430 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.useMain = useMain; const react_1 = require("react"); const main_1 = require("../../providers/main"); function useMain() { const context = (0, react_1.useContext)(main_1.Context); if (!context) throw new Error("The useMain function ought to be encapsulated within the scope of the MainProvider component."); return context; }