mirror of
https://github.com/ansible/awx.git
synced 2026-03-20 18:37:39 -02:30
fix eslint errors
This commit is contained in:
@@ -4,19 +4,20 @@ import {
|
|||||||
Redirect
|
Redirect
|
||||||
} from 'react-router-dom';
|
} from 'react-router-dom';
|
||||||
|
|
||||||
const ConditionalRedirect = ({ component: Component, shouldRedirect, redirectPath, ...props }) => {
|
const ConditionalRedirect = ({
|
||||||
if (shouldRedirect()) {
|
component: Component,
|
||||||
return (
|
shouldRedirect,
|
||||||
<Redirect to={{
|
redirectPath,
|
||||||
pathname: redirectPath,
|
location,
|
||||||
state: { from: props.location }
|
...props
|
||||||
}}/>
|
}) => (shouldRedirect() ? (
|
||||||
);
|
<Redirect to={{
|
||||||
} else {
|
pathname: redirectPath,
|
||||||
return (
|
state: { from: location }
|
||||||
<Route {...props} render={props => (<Component {...props}/>)} />
|
}}
|
||||||
);
|
/>
|
||||||
}
|
) : (
|
||||||
};
|
<Route {...props} render={rest => (<Component {...rest} />)} />
|
||||||
|
));
|
||||||
|
|
||||||
export default ConditionalRedirect;
|
export default ConditionalRedirect;
|
||||||
@@ -97,7 +97,7 @@ class LoginPage extends Component {
|
|||||||
onChange={this.handleUsernameChange}
|
onChange={this.handleUsernameChange}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="pf-c-form__group" id="password">>
|
<div className="pf-c-form__group" id="password">
|
||||||
<label className="pf-c-form__label" htmlFor="pw">
|
<label className="pf-c-form__label" htmlFor="pw">
|
||||||
Password
|
Password
|
||||||
<span className="pf-c-form__label__required" aria-hidden="true">*</span>
|
<span className="pf-c-form__label__required" aria-hidden="true">*</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user