fix: code smell "Ternary operators should not be nested"

This commit is contained in:
Tobias Mahnke 2021-04-20 18:04:41 +02:00
parent 331be96310
commit 201168cdb8

View file

@ -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} />}