Add covers for cards

This commit is contained in:
Maksim Eltyshev
2020-04-23 03:02:53 +05:00
parent f743f4ea8b
commit 3dffed90c6
26 changed files with 315 additions and 98 deletions

View File

@@ -64,6 +64,7 @@ export const makeCardByIdSelector = () =>
return {
...cardModel.ref,
coverUrl: cardModel.coverAttachment && cardModel.coverAttachment.coverUrl,
isPersisted: !isLocalId(id),
};
},

View File

@@ -355,6 +355,7 @@ export const attachmentsForCurrentCardSelector = createSelector(
.toRefArray()
.map((attachment) => ({
...attachment,
isCover: attachment.id === cardModel.coverAttachmentId,
isPersisted: !isLocalId(attachment.id),
}));
},