2017-04-23 23:10:45 +07:00
|
|
|
import React from 'react'
|
|
|
|
import {
|
|
|
|
connect
|
|
|
|
} from 'react-redux'
|
2017-05-10 20:59:47 -04:00
|
|
|
import {
|
2017-05-18 19:14:26 -04:00
|
|
|
doFetchFileInfosAndPublishedClaims,
|
|
|
|
} from 'actions/file_info'
|
2017-05-01 11:51:19 +07:00
|
|
|
import {
|
2017-05-18 19:14:26 -04:00
|
|
|
selectFileInfosPublished,
|
|
|
|
selectFileListDownloadedOrPublishedIsPending
|
2017-05-01 11:51:19 +07:00
|
|
|
} from 'selectors/file_info'
|
|
|
|
import {
|
|
|
|
doNavigate,
|
|
|
|
} from 'actions/app'
|
2017-04-23 23:10:45 +07:00
|
|
|
import FileListPublished from './view'
|
|
|
|
|
2017-05-01 11:51:19 +07:00
|
|
|
const select = (state) => ({
|
2017-05-18 19:14:26 -04:00
|
|
|
fileInfos: selectFileInfosPublished(state),
|
|
|
|
isPending: selectFileListDownloadedOrPublishedIsPending(state),
|
2017-05-01 11:51:19 +07:00
|
|
|
})
|
|
|
|
|
|
|
|
const perform = (dispatch) => ({
|
|
|
|
navigate: (path) => dispatch(doNavigate(path)),
|
2017-05-18 19:14:26 -04:00
|
|
|
fetchFileListPublished: () => dispatch(doFetchFileInfosAndPublishedClaims()),
|
2017-05-01 11:51:19 +07:00
|
|
|
})
|
|
|
|
|
|
|
|
export default connect(select, perform)(FileListPublished)
|