MM-9922 Fixed CSS transition when mousing onto internal link
This commit is contained in:
parent
d1b70863b5
commit
71dcec33a4
|
@ -2,10 +2,6 @@ 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}
|
||||||
|
@ -14,7 +10,6 @@ function HoveringURL(props) {
|
||||||
}
|
}
|
||||||
|
|
||||||
HoveringURL.propTypes = {
|
HoveringURL.propTypes = {
|
||||||
currentTeamURL: PropTypes.string,
|
|
||||||
targetURL: PropTypes.string,
|
targetURL: PropTypes.string,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -317,6 +317,7 @@ const MainPage = createReactClass({
|
||||||
authServerURL = `${tmpURL.protocol}//${tmpURL.host}`;
|
authServerURL = `${tmpURL.protocol}//${tmpURL.host}`;
|
||||||
authInfo = this.state.loginQueue[0].authInfo;
|
authInfo = this.state.loginQueue[0].authInfo;
|
||||||
}
|
}
|
||||||
|
var currentTeamURL = this.props.teams[this.state.key].url;
|
||||||
var modal = (
|
var modal = (
|
||||||
<NewTeamModal
|
<NewTeamModal
|
||||||
show={this.state.showNewTeamModal}
|
show={this.state.showNewTeamModal}
|
||||||
|
@ -364,7 +365,7 @@ const MainPage = createReactClass({
|
||||||
{ viewsRow }
|
{ viewsRow }
|
||||||
</Grid>
|
</Grid>
|
||||||
<TransitionGroup>
|
<TransitionGroup>
|
||||||
{ (this.state.targetURL === '') ?
|
{ (this.state.targetURL === '' || this.state.targetURL.startsWith(currentTeamURL)) ?
|
||||||
null :
|
null :
|
||||||
<CSSTransition
|
<CSSTransition
|
||||||
classNames='hovering'
|
classNames='hovering'
|
||||||
|
@ -372,7 +373,6 @@ 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>
|
||||||
|
|
Loading…
Reference in a new issue