mirror of
https://github.com/ascribe/onion.git
synced 2025-01-09 05:06:59 +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],
|
mixins: [Router.Navigation],
|
||||||
|
|
||||||
getLinkData(){
|
getLinkData() {
|
||||||
return {
|
|
||||||
to: 'piece',
|
if(this.props.piece && this.props.piece.first_edition) {
|
||||||
params: {
|
return {
|
||||||
pieceId: this.props.piece.id
|
to: 'edition',
|
||||||
}
|
params: {
|
||||||
};
|
editionId: this.props.piece.first_edition.bitcoin_id
|
||||||
|
}
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
return {
|
||||||
|
to: 'piece',
|
||||||
|
params: {
|
||||||
|
pieceId: this.props.piece.id
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
Loading…
Reference in New Issue
Block a user