import { h, Component } from 'preact' import { bindActionCreators } from 'redux' import { connect } from 'react-redux' import moment from 'moment' import * as util from '../util' class FileList extends Component { constructor(props){ super() } render(){ const { files } = this.props const fileList = files.map(file => { return (
{file.name || file.url}
{file.size || ''}
{moment(file.created_at).format("YYYY-MM-DD H:mm")}
{file.epoch &&
epoch {file.epoch}
}
{file.activity || ''} {file.module || ''}
{this.props.options && this.props.options(file)}
) }) return (
{fileList}
) } } const mapStateToProps = state => ({ }) const mapDispatchToProps = (dispatch, ownProps) => ({ // actions: bindActionCreators(liveActions, dispatch) }) export default connect(mapStateToProps, mapDispatchToProps)(FileList)