chore: show caret for empty folders

This commit is contained in:
Anoop M D 2022-03-16 02:27:52 +05:30
parent dfa68561f6
commit bd621196ba
2 changed files with 2 additions and 1 deletions

View File

@ -86,7 +86,7 @@ const CollectionItem = ({item, collectionUid}) => {
}} }}
> >
<div style={{width:16}}> <div style={{width:16}}>
{item.items && item.items.length ? ( {item.type === 'folder' ? (
<IconChevronRight size={16} strokeWidth={2} className={iconClassName} style={{color: 'rgb(160 160 160)'}}/> <IconChevronRight size={16} strokeWidth={2} className={iconClassName} style={{color: 'rgb(160 160 160)'}}/>
) : null} ) : null}
</div> </div>

View File

@ -122,6 +122,7 @@ const reducer = (state, action) => {
collection.items.push({ collection.items.push({
uid: nanoid(), uid: nanoid(),
name: action.folderName, name: action.folderName,
type: 'folder',
items: [], items: [],
// todo: this will be autoassigned // todo: this will be autoassigned
depth: 1 depth: 1