es6-ified demo, flattened collections scaffold files
This commit is contained in:
@@ -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>
|
||||
);
|
||||
})}
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -8,7 +8,7 @@ export default props => {
|
||||
<article className="collection-archive">
|
||||
<SetStepNav nav={ [
|
||||
{
|
||||
label: props.collection.attrs.label
|
||||
label: props.collection.label
|
||||
}
|
||||
] } />
|
||||
{props.children}
|
||||
|
||||
@@ -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}`,
|
||||
|
||||
@@ -8,7 +8,9 @@ export default (state = defaultState, action) => {
|
||||
|
||||
return {
|
||||
...state,
|
||||
all: action.payload
|
||||
all: {
|
||||
[action.payload.slug]: action.payload
|
||||
}
|
||||
};
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user