From 00c7999c6c590603cdfd069d85fc87feb95f6fea Mon Sep 17 00:00:00 2001 From: David Ichim Date: Tue, 29 Nov 2022 16:00:57 +0200 Subject: [PATCH] change(label): color selection for archived now is applied when isExpired is set - we don't have review_state == 'archived' yet --- src/components/UniversalCard/fragments/CardImage.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/UniversalCard/fragments/CardImage.jsx b/src/components/UniversalCard/fragments/CardImage.jsx index 7698e6d5..0f47c255 100644 --- a/src/components/UniversalCard/fragments/CardImage.jsx +++ b/src/components/UniversalCard/fragments/CardImage.jsx @@ -4,7 +4,6 @@ import { ConditionalLink } from '@plone/volto/components'; import PreviewImage from '@eeacms/volto-listing-block/PreviewImage'; const getLabel = (props) => { - // { text: 'new', side: 'left', color: 'green' } const { item, itemModel = {} } = props; const text = item.isNew ? 'New' : item.isExpired ? 'Archived' : null; @@ -13,7 +12,7 @@ const getLabel = (props) => { text, side: 'left', // TODO: set the colors from css? - color: item.review_state === 'archived' ? 'yellow' : 'green', + color: item.isExpired ? 'yellow' : 'green', } : null; };