[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
710 B

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