Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
import React from 'react';
import SubmissionsList from './SubmissionsList';
import SubmissionsListPage from './SubmissionsListPage';
import { connect } from 'react-redux';
import { fetchSubmissionsList } from '../actions_creators/SubmissionsListActionsCreator';
class PendingSubmissionsPage extends SubmissionsListPage {
componentDidMount() {
this.props.dispatch(fetchSubmissionsList('pending'));
}
render() {
return (
<SubmissionsList attributes={this.attributes()}
submissions={this.props.submissions} />
);
}
};
function select(state) {
const submissions = Object.keys(state.submissions)
.map(k => state.submissions[k]);
return {
submissions: submissions
};
}
export default connect(select)(PendingSubmissionsPage);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment