ra-core
Version:
Core components of react-admin, a frontend Framework for building admin applications on top of REST services, using ES6, React
14 lines • 642 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.useCloseNotification = void 0;
var react_1 = require("react");
var CloseNotificationContext_1 = require("./CloseNotificationContext");
var useCloseNotification = function () {
var closeNotification = (0, react_1.useContext)(CloseNotificationContext_1.CloseNotificationContext);
if (!closeNotification) {
throw new Error('useCloseNotification must be used within a CloseNotificationContext.Provider');
}
return closeNotification;
};
exports.useCloseNotification = useCloseNotification;
//# sourceMappingURL=useCloseNotification.js.map
;