diff --git a/react/src/components/Home/Content/Example/Chip.js b/react/src/components/Home/Content/Example/Chip.js index 3d9cde3..d5bac9d 100644 --- a/react/src/components/Home/Content/Example/Chip.js +++ b/react/src/components/Home/Content/Example/Chip.js @@ -1,4 +1,5 @@ import React, { Component } from 'react' +import { Link } from 'react-router-dom'; import Chip from 'material-ui/Chip'; import Avatar from 'material-ui/Avatar'; @@ -26,9 +27,11 @@ export default class MyChip extends Component { return ( {avatarName}} + component = { Link } label={this.props.entity.name} onClick={this.handleClick} style={chipStyle} + to = {`/graph/${this.props.entity.id}`} /> ) } diff --git a/react/src/components/Home/Content/Example/Example.js b/react/src/components/Home/Content/Example/Example.js index c29d4a7..6b8a1de 100644 --- a/react/src/components/Home/Content/Example/Example.js +++ b/react/src/components/Home/Content/Example/Example.js @@ -18,7 +18,6 @@ export default class Example extends Component { handleChipClick = (entity) => { logGraph(entity.id) this.props.show.searchBar && ['/', '/search'].indexOf(this.props.location.pathname) > -1 && this.props.closeAll(); - this.props.history.push('/graph/' + entity.id) } componentWillUpdate(nextProps, nextState) {