mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 11:00:03 -03:30
fix eslint errors
This commit is contained in:
parent
2245d6a22e
commit
1caa5b1c54
@ -4,19 +4,20 @@ import {
|
||||
Redirect
|
||||
} from 'react-router-dom';
|
||||
|
||||
const ConditionalRedirect = ({ component: Component, shouldRedirect, redirectPath, ...props }) => {
|
||||
if (shouldRedirect()) {
|
||||
return (
|
||||
<Redirect to={{
|
||||
pathname: redirectPath,
|
||||
state: { from: props.location }
|
||||
}}/>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<Route {...props} render={props => (<Component {...props}/>)} />
|
||||
);
|
||||
}
|
||||
};
|
||||
const ConditionalRedirect = ({
|
||||
component: Component,
|
||||
shouldRedirect,
|
||||
redirectPath,
|
||||
location,
|
||||
...props
|
||||
}) => (shouldRedirect() ? (
|
||||
<Redirect to={{
|
||||
pathname: redirectPath,
|
||||
state: { from: location }
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
<Route {...props} render={rest => (<Component {...rest} />)} />
|
||||
));
|
||||
|
||||
export default ConditionalRedirect;
|
||||
export default ConditionalRedirect;
|
||||
|
||||
@ -97,7 +97,7 @@ class LoginPage extends Component {
|
||||
onChange={this.handleUsernameChange}
|
||||
/>
|
||||
</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">
|
||||
Password
|
||||
<span className="pf-c-form__label__required" aria-hidden="true">*</span>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user