MM-9922 Don't show hovered URL for internal links
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
|
@@ -372,6 +372,7 @@ const MainPage = createReactClass({
|
||||
>
|
||||
<HoveringURL
|
||||
key='hoveringURL'
|
||||
currentTeamURL={this.props.teams[this.state.key].url}
|
||||
targetURL={this.state.targetURL}
|
||||
/>
|
||||
</CSSTransition>
|
||||
|
Reference in New Issue
Block a user