es6-ified demo, flattened collections scaffold files

This commit is contained in:
James
2018-09-17 18:45:55 -04:00
parent cdcbd9ea37
commit e44dfb46c6
15 changed files with 53 additions and 61 deletions

View File

@@ -30,7 +30,7 @@ class Sidebar extends Component {
return (
<Link className={classes} key={i} to={href}>
<Arrow />
{this.props.collections[key].attrs.plural}
{this.props.collections[key].plural}
</Link>
);
})}

View File

@@ -9,7 +9,7 @@ export default props => {
<SetStepNav nav={ [
{
url: `/collections/${props.slug}`,
label: props.collection.attrs.label
label: props.collection.label
},
{
label: 'Add New'

View File

@@ -8,7 +8,7 @@ export default props => {
<article className="collection-archive">
<SetStepNav nav={ [
{
label: props.collection.attrs.label
label: props.collection.label
}
] } />
{props.children}

View File

@@ -7,7 +7,7 @@ export default props => {
<SetStepNav nav={ [
{
url: `/collections/${props.slug}`,
label: props.collection.attrs.label
label: props.collection.label
},
{
url: `/collections/${props.slug}/${props.id}`,

View File

@@ -8,7 +8,9 @@ export default (state = defaultState, action) => {
return {
...state,
all: action.payload
all: {
[action.payload.slug]: action.payload
}
};
default: