@talend/react-containers
Version:
Provide connected components aka containers for @talend/react-cmf based on @talend/react-components.
20 lines (19 loc) • 523 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = clearNotifications;
function clearNotifications(state) {
const path = ['Container(Notification)', 'Notification', 'notifications'];
let notifs = state.cmf.components.getIn(path);
if (!notifs) {
return state;
}
notifs = notifs.clear();
const newState = {
...state
};
newState.cmf.components = state.cmf.components.setIn(path, notifs);
return newState;
}
//# sourceMappingURL=clearNotifications.js.map