From a17b76ac75f506f5da6fe8adf9c36632b60d4226 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sat, 26 Sep 2020 14:56:02 +0200 Subject: refactor to use app-rooted js imports --- frontend/app/views/upload/upload.container.js | 35 +++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 frontend/app/views/upload/upload.container.js (limited to 'frontend/app/views/upload/upload.container.js') diff --git a/frontend/app/views/upload/upload.container.js b/frontend/app/views/upload/upload.container.js new file mode 100644 index 0000000..608f01a --- /dev/null +++ b/frontend/app/views/upload/upload.container.js @@ -0,0 +1,35 @@ +import React, { Component } from 'react' +import { Route, Link } from 'react-router-dom' +import { bindActionCreators } from 'redux' +import { connect } from 'react-redux' + +import './upload.css' + +import * as uploadActions from './upload.actions' + +import UploadIndex from './components/upload.index' +import UploadShow from './components/upload.show' + +class Container extends Component { + render() { + return ( +
+
+ + +
+
+ ) + } +} + +const mapStateToProps = state => ({ + upload: state.upload, + searchOptions: state.search.options, +}) + +const mapDispatchToProps = dispatch => ({ + uploadActions: bindActionCreators({ ...uploadActions }, dispatch), +}) + +export default connect(mapStateToProps, mapDispatchToProps)(Container) -- cgit v1.2.3-70-g09d2