diff options
author | Thibaut Girka <thib@sitedethib.com> | 2019-04-20 20:52:07 +0200 |
---|---|---|
committer | ThibG <thib@sitedethib.com> | 2019-04-22 20:15:47 +0200 |
commit | 281a82d8784fec7e79e309095cbe61428173b44f (patch) | |
tree | f937d1b490db7287834be28e8ab4e4c3e24b32cc /app/javascript/flavours/glitch/features/compose/containers | |
parent | 9a2f10fe8b24d48f0b7c5dde545b2df3c8952330 (diff) |
DrawerHeader → Header + HeaderContainer
Diffstat (limited to 'app/javascript/flavours/glitch/features/compose/containers')
-rw-r--r-- | app/javascript/flavours/glitch/features/compose/containers/header_container.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/features/compose/containers/header_container.js b/app/javascript/flavours/glitch/features/compose/containers/header_container.js new file mode 100644 index 000000000..6f1978807 --- /dev/null +++ b/app/javascript/flavours/glitch/features/compose/containers/header_container.js @@ -0,0 +1,21 @@ +import { openModal } from 'flavours/glitch/actions/modal'; +import { connect } from 'react-redux'; +import Header from '../components/header'; + +const mapStateToProps = state => { + return { + columns: state.getIn(['settings', 'columns']), + unreadNotifications: state.getIn(['notifications', 'unread']), + showNotificationsBadge: state.getIn(['local_settings', 'notifications', 'tab_badge']), + }; +}; + +const mapDispatchToProps = (dispatch, { intl }) => ({ + onOpenSettings (e) { + e.preventDefault(); + e.stopPropagation(); + dispatch(openModal('SETTINGS', {})); + }, +}); + +export default connect(mapStateToProps, mapDispatchToProps)(Header); |