mirror of
https://github.com/Unleash/unleash.git
synced 2025-06-04 01:18:20 +02:00
* chore: update changelog * 4.0.0-alpha.4 * wip: frontend should understand rbac permissions * move all feature components to hasAccess * fix: remove all change permissions * fix all the tests * fix all the tests x2 * fix snapshot for node 12 * fine tune perms a bit * refactor: rewrite to ts * refactor: use admin constant * fix: import Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com>
23 lines
626 B
JavaScript
23 lines
626 B
JavaScript
import { connect } from 'react-redux';
|
|
import ContextList from './ContextList';
|
|
import { fetchContext, removeContextField } from '../../../store/context/actions';
|
|
|
|
const mapStateToProps = state => {
|
|
const list = state.context.toJS();
|
|
|
|
return {
|
|
contextFields: list,
|
|
};
|
|
};
|
|
|
|
const mapDispatchToProps = dispatch => ({
|
|
removeContextField: contextField => {
|
|
removeContextField(contextField)(dispatch);
|
|
},
|
|
fetchContext: () => fetchContext()(dispatch),
|
|
});
|
|
|
|
const ContextFieldListContainer = connect(mapStateToProps, mapDispatchToProps)(ContextList);
|
|
|
|
export default ContextFieldListContainer;
|