Extract expression to avoid Prettier changing it

This commit is contained in:
Kimmo Puputti 2017-01-26 09:42:37 +02:00
parent 7995fc7f64
commit 366a510891

View file

@ -30,7 +30,8 @@ export const fakeAuth = {
/* eslint-disable arrow-body-style */
const MatchWithSubRoutes = props => {
const { auth, component: Component, ...rest } = props;
const canShowComponent = !auth || (auth && fakeAuth.isAuthenticated);
const isAuthenticated = auth && fakeAuth.isAuthenticated;
const canShowComponent = !auth || isAuthenticated;
return (
<Match
{...rest}