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 edition and piece detial view
This commit is contained in:
parent
1f7addb886
commit
1207522266
@ -85,7 +85,7 @@ let Edition = React.createClass({
|
||||
<hr style={{marginTop: 0}}/>
|
||||
<h1 className="ascribe-detail-title">{this.props.edition.title}</h1>
|
||||
<EditionDetailProperty label="BY" value={this.props.edition.artist_name} />
|
||||
<EditionDetailProperty label="DATE" value={ this.props.edition.date_created.slice(0, 4) } />
|
||||
<EditionDetailProperty label="DATE" value={ new Date(this.props.edition.date_created).getFullYear() } />
|
||||
<hr/>
|
||||
</div>
|
||||
<EditionSummary
|
||||
|
@ -230,7 +230,7 @@ let PieceContainer = React.createClass({
|
||||
<hr style={{marginTop: 0}}/>
|
||||
<h1 className="ascribe-detail-title">{this.state.piece.title}</h1>
|
||||
<DetailProperty label="BY" value={this.state.piece.artist_name} />
|
||||
<DetailProperty label="DATE" value={ this.state.piece.date_created.slice(0, 4) } />
|
||||
<DetailProperty label="DATE" value={ new Date(this.state.piece.date_created).getFullYear() } />
|
||||
{this.state.piece.num_editions > 0 ? <DetailProperty label="EDITIONS" value={ this.state.piece.num_editions } /> : null}
|
||||
<hr/>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user