import React from 'react'; import { connect } from 'react-redux'; import { clickRelative } from '../../actions/app-actions'; import MatchedText from '../matched-text'; class NodeDetailsRelativesLink extends React.Component { constructor(props, context) { super(props, context); this.handleClick = this.handleClick.bind(this); this.saveNodeRef = this.saveNodeRef.bind(this); } handleClick(ev) { ev.preventDefault(); this.props.dispatch(clickRelative( this.props.id, this.props.topologyId, this.props.label, this.node.getBoundingClientRect() )); } saveNodeRef(ref) { this.node = ref; } render() { const title = `View in ${this.props.topologyId}: ${this.props.label}`; return ( ); } } export default connect()(NodeDetailsRelativesLink);