oysterprotocol/webinterface

View on GitHub
src/components/download-form/index.tsx

Summary

Maintainability
A
0 mins
Test Coverage
import React from "react";
import { connect } from "react-redux";

import downloadActions from "../../redux/actions/download-actions";
import DownloadFormSlide from "./download-form-slide";

const mapStateToProps = state => ({
  status: state.download.status
});
const mapDispatchToProps = dispatch => ({
  initializeDownloadFn: handle =>
    dispatch(downloadActions.streamDownload({ handle }))
});

const DownloadForm = ({ initializeDownloadFn, status }) => (
  <DownloadFormSlide download={initializeDownloadFn} status={status} />
);

export default connect(mapStateToProps, mapDispatchToProps)(DownloadForm);