1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 17:33:14 +01:00

change link in accordionlist item dependent on domain

This commit is contained in:
Tim Daubenschütz 2015-08-25 17:22:32 +02:00
parent bfbb96311c
commit 88b525f352

View File

@ -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() {