Fix workspace shortcut displays incorrectly (#5)

This commit is contained in:
Quang Lam 2019-09-08 10:44:06 -05:00 committed by GitHub
parent 2de01ddd11
commit af8b1ea67b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -129,7 +129,10 @@ const setWorkspacePicture = (id, sourcePicturePath) => {
pictureId, pictureId,
picturePath: destPicturePath, picturePath: destPicturePath,
}); });
if (currentPicturePath) {
return fsExtra.remove(currentPicturePath); return fsExtra.remove(currentPicturePath);
}
return null;
}) })
.catch(console.log); .catch(console.log);
}; };

View file

@ -102,7 +102,9 @@ const WorkspaceSelector = ({
{badgeCount > 9 ? '*' : badgeCount} {badgeCount > 9 ? '*' : badgeCount}
</div> </div>
)} )}
{(id === 'add' || order < 9) && (
<p className={classes.shortcutText}>{id === 'add' ? 'Add' : `⌘ + ${order + 1}`}</p> <p className={classes.shortcutText}>{id === 'add' ? 'Add' : `⌘ + ${order + 1}`}</p>
)}
</div> </div>
); );