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,19 @@
import React from 'react';
import { Link } from 'react-router';
export default class EntryListing extends React.Component {
render() {
const { collection, entries } = this.props;
const name = collection.get('name');
return <div>
<h2>Listing entries!</h2>
{entries.map((entry) => {
const path = `/collections/${name}/entries/${entry.get('slug')}`;
return <Link key={entry.get('slug')} to={path}>
<h3>{entry.getIn(['data', 'title'])}</h3>
</Link>;
})}
</div>;
}
}