Skip to content
This repository has been archived by the owner on Jan 2, 2021. It is now read-only.

Commit

Permalink
fix: Check subentries length and append correct plural (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
SomtoUgeh authored Nov 1, 2020
1 parent cb1b217 commit 86f5a8d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Explorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const DefaultRenderer = ({
<Expander expanded={expanded} /> {label}{' '}
<Info>
{String(type).toLowerCase() === 'iterable' ? '(Iterable) ' : ''}
{subEntries.length} items
{subEntries.length} {subEntries.length > 1 ? `items` : `item`}
</Info>
</Label>
{expanded ? (
Expand Down Expand Up @@ -104,7 +104,10 @@ const DefaultRenderer = ({
</>
) : (
<>
<Label>{label}:</Label> <Value>{JSON.stringify(value, Object.getOwnPropertyNames(Object(value)))}</Value>
<Label>{label}:</Label>{' '}
<Value>
{JSON.stringify(value, Object.getOwnPropertyNames(Object(value)))}
</Value>
</>
)}
</Entry>
Expand Down

0 comments on commit 86f5a8d

Please sign in to comment.