import React from 'react'; import {State} from 'react-router'; export default React.createClass({ mixins: [ State ], contextTypes: { router: React.PropTypes.func.isRequired }, render: function() { var image = this.props.shares ? this.props.shares[0].artwork.large : 'https://match.audio/images/logo-512.png'; var title = this.props.shares ? this.props.shares[0].name + ' by ' + this.props.shares[0].artist.name : 'Match Audio'; var shareUrl = 'https://match.audio/' + this.getParams().service + '/' + this.getParams().type + '/' + this.getParams().id; return ( {this.props.shares ? 'Listen to ' + this.props.shares[0].name + ' by ' + this.props.shares[0].artist.name + ' on Match Audio' : 'Match Audio'} ); } });