1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-15 01:25:17 +01:00

Fix correct year extraction from date-string in

AccordionListItemPrize
PrizePieceContainer
CylandAccordionListItem
IkonotvAccordionListItem
This commit is contained in:
Tim Daubenschütz 2015-10-26 16:07:31 +01:00
parent 1207522266
commit 42733740db
4 changed files with 4 additions and 4 deletions

View File

@ -182,7 +182,7 @@ let AccordionListItemPrize = React.createClass({
artistName={artistName}
subsubheading={
<div>
<span>{this.props.content.date_created.split('-')[0]}</span>
<span>{new Date(this.props.content.date_created).getFullYear()}</span>
</div>}
buttons={this.getPrizeButtons()}
badge={this.getPrizeBadge()}>

View File

@ -141,7 +141,7 @@ let PieceContainer = React.createClass({
<hr/>
<h1 className="ascribe-detail-title">{this.state.piece.title}</h1>
<DetailProperty label={getLangText('BY')} value={artistName} />
<DetailProperty label={getLangText('DATE')} value={ this.state.piece.date_created.slice(0, 4) } />
<DetailProperty label={getLangText('DATE')} value={new Date(this.state.piece.date_created).getFullYear()} />
{artistEmail}
{this.getActions()}
<hr/>

View File

@ -100,7 +100,7 @@ let CylandAccordionListItem = React.createClass({
piece={this.props.content}
subsubheading={
<div className="pull-left">
<span>{this.props.content.date_created.split('-')[0]}</span>
<span>{new Date(this.props.content.date_created).getFullYear()}</span>
</div>}
buttons={this.getSubmitButtons()}>
{this.props.children}

View File

@ -106,7 +106,7 @@ let IkonotvAccordionListItem = React.createClass({
piece={this.props.content}
subsubheading={
<div className="pull-left">
<span>{this.props.content.date_created.split('-')[0]}</span>
<span>{new Date(this.props.content.date_created).getFullYear()}</span>
</div>}
buttons={this.getSubmitButtons()}>
{this.props.children}