diff --git a/src/js/components/ArtistList.js b/src/js/components/ArtistList.js index e194fee6..fcd80dee 100755 --- a/src/js/components/ArtistList.js +++ b/src/js/components/ArtistList.js @@ -6,7 +6,7 @@ import Thumbnail from './Thumbnail' export default class ArtistList extends React.Component{ constructor(props) { - super(props); + super(props) } render(){ diff --git a/src/js/components/List.js b/src/js/components/List.js index ea60c297..140c8c07 100755 --- a/src/js/components/List.js +++ b/src/js/components/List.js @@ -1,6 +1,6 @@ import React, { PropTypes } from 'react' -import { Link } from 'react-router' +import { Link, browserHistory } from 'react-router' import FontAwesome from 'react-fontawesome' import ArtistSentence from './ArtistSentence' @@ -13,6 +13,14 @@ export default class List extends React.Component{ super(props); } + handleClick(e, uri){ + + // make sure we haven't clicked a nested link (ie Artist name) + if( e.target.tagName.toLowerCase() !== 'a' ){ + browserHistory.push( this.props.link_prefix + encodeURIComponent(uri) ); + } + } + renderHeader(){ if( !this.props.columns ) return null @@ -54,7 +62,7 @@ export default class List extends React.Component{ { this.props.rows.map( (row, row_index) => { return ( - +