2017-07-11 20:17:00 +02:00
|
|
|
import { connect } from 'react-redux'
|
|
|
|
import { addCount } from 'actions'
|
|
|
|
import { selectLight, selectLastUpdate, selectCount } from 'selectors'
|
|
|
|
import { createSelector } from 'reselect'
|
|
|
|
import { compose, setDisplayName, pure } from 'recompose'
|
|
|
|
import Page from 'components/page'
|
|
|
|
|
|
|
|
export default compose(
|
|
|
|
setDisplayName('PageContainer'),
|
2018-12-17 17:34:32 +01:00
|
|
|
connect(
|
|
|
|
createSelector(
|
|
|
|
selectLight(),
|
|
|
|
selectLastUpdate(),
|
|
|
|
selectCount(),
|
|
|
|
(light, lastUpdate, count) => ({ light, lastUpdate, count })
|
|
|
|
),
|
|
|
|
{ addCount }
|
|
|
|
),
|
2017-07-11 20:17:00 +02:00
|
|
|
pure
|
|
|
|
)(Page)
|