2017-12-21 22:08:54 +01:00
|
|
|
import { connect } from 'react-redux';
|
2018-04-18 06:03:01 +02:00
|
|
|
import { doFetchBlock, makeSelectBlockDate } from 'lbry-redux';
|
2017-12-21 22:08:54 +01:00
|
|
|
import DateTime from './view';
|
2017-09-03 18:35:01 +02:00
|
|
|
|
|
|
|
const select = (state, props) => ({
|
2017-12-21 22:08:54 +01:00
|
|
|
date: !props.date && props.block ? makeSelectBlockDate(props.block)(state) : props.date,
|
2017-09-03 18:35:01 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
const perform = dispatch => ({
|
|
|
|
fetchBlock: height => dispatch(doFetchBlock(height)),
|
|
|
|
});
|
|
|
|
|
2018-10-31 17:35:12 +01:00
|
|
|
export default connect(
|
|
|
|
select,
|
|
|
|
perform
|
|
|
|
)(DateTime);
|