add object support to widgetsFor

This commit is contained in:
Shawn Erquhart
2017-03-06 13:28:11 -05:00
parent 9dca9f912a
commit 9bc80ed5e4
2 changed files with 16 additions and 9 deletions

View File

@ -98,10 +98,10 @@
h('h1', {}, title),
h('dl', {},
h('dt', {}, 'Posts on Frontpage'),
h('dd', {}, posts && posts.get('front_limit') || '0'),
h('dd', {}, this.props.widgetsFor('posts').getIn(['widgets', 'front_limit']) || 0),
h('dt', {}, 'Default Author'),
h('dd', {}, posts && posts.get('author') || 'None'),
h('dd', {}, this.props.widgetsFor('posts').getIn(['data', 'front_limit']) || 'None'),
h('dt', {}, 'Default Thumbnail'),
h('dd', {}, thumb && h('img', {src: this.props.getAsset(thumb).toString()}))