[ABANDONED] React/Redux front end for the Flexor social network.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

26 lines
670 B

import { Dispatch } from 'redux'
import { connect } from 'react-redux'
import { setAuto, dismiss } from '../../actions/notifications'
import { getNotifications } from '../../selectors'
import { AppState } from '../../types'
import NotificationContainer from './notification-container'
const mapStateToProps = (state: AppState) => ({
notifications: getNotifications(state),
})
const mapDispatchToProps = (dispatch: Dispatch) => ({
setAuto: (id: string) => {
dispatch(setAuto(id))
},
dismiss: (id: string) => {
dispatch(dismiss(id))
}
})
export default connect(
mapStateToProps,
mapDispatchToProps
)(NotificationContainer)