tidy ListDrawer render logic

This commit is contained in:
Collin M. Barrett 2019-09-03 06:48:38 -05:00
parent 931c874e06
commit 90c835fd4d

View file

@ -30,7 +30,7 @@ export const ListDrawer = (props: Props) => {
syntax={list.syntaxId ? props.syntaxes.find(s => s.id === list.syntaxId) : undefined}
tags={list.tagIds && props.tags.filter((t: Tag) => list.tagIds.includes(t.id))}
{...rp} />
: (props.lists && props.lists.length && <Redirect to={{ pathname: "/", }} />) || null;
: (props.lists && props.lists.length) ? <Redirect to={{ pathname: "/", }} /> : null;
};
return <Route path="/lists/:listSlug" render={renderDrawer} />;
};