Initial commit
This commit is contained in:
Executable
+16
@@ -0,0 +1,16 @@
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { currentModalSelector } from '../selectors';
|
||||
import ModalTypes from '../constants/ModalTypes';
|
||||
import App from '../components/App';
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
const currentModal = currentModalSelector(state);
|
||||
|
||||
return {
|
||||
isUsersModalOpened: currentModal === ModalTypes.USERS,
|
||||
isAddProjectModalOpened: currentModal === ModalTypes.ADD_PROJECT,
|
||||
};
|
||||
};
|
||||
|
||||
export default connect(mapStateToProps)(App);
|
||||
Reference in New Issue
Block a user