mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 01:25:17 +01:00
change link in accordionlist item dependent on domain
This commit is contained in:
parent
bfbb96311c
commit
88b525f352
@ -26,13 +26,24 @@ let AccordionListItemPiece = React.createClass({
|
||||
|
||||
mixins: [Router.Navigation],
|
||||
|
||||
getLinkData(){
|
||||
return {
|
||||
to: 'piece',
|
||||
params: {
|
||||
pieceId: this.props.piece.id
|
||||
}
|
||||
};
|
||||
getLinkData() {
|
||||
|
||||
if(this.props.piece && this.props.piece.first_edition) {
|
||||
return {
|
||||
to: 'edition',
|
||||
params: {
|
||||
editionId: this.props.piece.first_edition.bitcoin_id
|
||||
}
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
to: 'piece',
|
||||
params: {
|
||||
pieceId: this.props.piece.id
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
render() {
|
||||
|
Loading…
Reference in New Issue
Block a user