Test repo can now be used to list entries

This commit is contained in:
Mathias Biilmann Christensen
2016-02-25 20:40:35 -08:00
parent 67cdd92bfb
commit 978b7290c5
17 changed files with 363 additions and 41 deletions

View File

@ -0,0 +1,33 @@
import React from 'react';
import { Link } from 'react-router';
import { connect } from 'react-redux';
import { loadEntries } from '../actions/entries';
import EntryListing from '../components/EntryListing';
class DashboardPage extends React.Component {
componentDidMount() {
}
componentWillReceiveProps(nextProps) {
}
render() {
const { collection, entry } = this.props;
return <div>
<h1>Entry in {collection.get('label')}</h1>
<h2>{entry && entry.get('title')}</h2>
</div>;
}
}
function mapStateToProps(state, ownProps) {
const { collections } = state;
return {
collection: collections.get(ownProps.params.name),
collections: collections
};
}
export default connect(mapStateToProps)(DashboardPage);