blob: 6c58ee52997c1ad17baa3ffa4ac1efae7de74bbe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import { connect } from 'react-redux'
import { initNewFolder, openFolder, addFiles } from '../actions'
import FolderListView from '../components/Browser/Folders/FolderListView.jsx'
const mapStateToProps = (state) => (state.folders)
const mapDispatchToProps = (dispatch, ownProps) => ({
initNewFolder: () => {
dispatch(initNewFolder())
},
openFolder: (folder) => {
dispatch(openFolder(folder, (files) => {
dispatch(addFiles(files))
}))
},
})
const FolderList = connect(
mapStateToProps,
mapDispatchToProps
)(FolderListView)
export default FolderList
|