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');
|
const PropTypes = require('prop-types');
|
||||||
|
|
||||||
function HoveringURL(props) {
|
function HoveringURL(props) {
|
||||||
|
if (props.targetURL.startsWith(props.currentTeamURL)) {
|
||||||
|
return <div/>;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='HoveringURL HoveringURL-left'>
|
<div className='HoveringURL HoveringURL-left'>
|
||||||
{props.targetURL}
|
{props.targetURL}
|
||||||
@@ -10,6 +14,7 @@ function HoveringURL(props) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
HoveringURL.propTypes = {
|
HoveringURL.propTypes = {
|
||||||
|
currentTeamURL: PropTypes.string,
|
||||||
targetURL: PropTypes.string,
|
targetURL: PropTypes.string,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -372,6 +372,7 @@ const MainPage = createReactClass({
|
|||||||
>
|
>
|
||||||
<HoveringURL
|
<HoveringURL
|
||||||
key='hoveringURL'
|
key='hoveringURL'
|
||||||
|
currentTeamURL={this.props.teams[this.state.key].url}
|
||||||
targetURL={this.state.targetURL}
|
targetURL={this.state.targetURL}
|
||||||
/>
|
/>
|
||||||
</CSSTransition>
|
</CSSTransition>
|
||||||
|
Reference in New Issue
Block a user