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,
picturePath: destPicturePath,
});
if (currentPicturePath) {
return fsExtra.remove(currentPicturePath);
}
return null;
})
.catch(console.log);
};

View file

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