Using ramda isEmpty

This commit is contained in:
José Oliveira 2021-02-04 14:02:06 +00:00 committed by Josh Harvey
parent 037f383540
commit 9f0d470c2c
2 changed files with 4 additions and 2 deletions

View file

@ -135,7 +135,9 @@ const Logs = () => {
</TableBody> </TableBody>
</Table> </Table>
{loading && <H4>{'Loading...'}</H4>} {loading && <H4>{'Loading...'}</H4>}
{!loading && !logsResponse && <H4>{'No activity so far'}</H4>} {!loading && !R.isEmpty(logsResponse) && (
<H4>{'No activity so far'}</H4>
)}
</div> </div>
</div> </div>
</> </>

View file

@ -189,7 +189,7 @@ const Logs = () => {
</TableBody> </TableBody>
</Table> </Table>
{loading && <H4>{'Loading...'}</H4>} {loading && <H4>{'Loading...'}</H4>}
{!loading && !data && <H4>{'No activity so far'}</H4>} {!loading && !R.isEmpty(data) && <H4>{'No activity so far'}</H4>}
</div> </div>
</div> </div>
</> </>