fix: code smell "Ternary operators should not be nested"
This commit is contained in:
parent
331be96310
commit
201168cdb8
1 changed files with 5 additions and 3 deletions
|
@ -21,9 +21,11 @@ const RegistrationPage = connect((state: RootState) => ({ loggedIn: Boolean(stat
|
|||
}
|
||||
}, []);
|
||||
|
||||
return loggedIn ? (
|
||||
<Redirect to="/" />
|
||||
) : (
|
||||
if (loggedIn) {
|
||||
return <Redirect to="/" />;
|
||||
}
|
||||
|
||||
return (
|
||||
<Page small>
|
||||
<h2>Register</h2>
|
||||
{message ? message : <RegistrationForm onSubmit={onSubmit} />}
|
||||
|
|
Loading…
Add table
Reference in a new issue