MM-9922 Don't show hovered URL for internal links

This commit is contained in:
Harrison Healey
2018-03-26 17:06:20 -04:00
parent f725b4a330
commit d1b70863b5
2 changed files with 6 additions and 0 deletions

View File

@@ -2,6 +2,10 @@ const React = require('react');
const PropTypes = require('prop-types');
function HoveringURL(props) {
if (props.targetURL.startsWith(props.currentTeamURL)) {
return <div/>;
}
return (
<div className='HoveringURL HoveringURL-left'>
{props.targetURL}
@@ -10,6 +14,7 @@ function HoveringURL(props) {
}
HoveringURL.propTypes = {
currentTeamURL: PropTypes.string,
targetURL: PropTypes.string,
};

View File

@@ -372,6 +372,7 @@ const MainPage = createReactClass({
>
<HoveringURL
key='hoveringURL'
currentTeamURL={this.props.teams[this.state.key].url}
targetURL={this.state.targetURL}
/>
</CSSTransition>