Skip to content

Commit

Permalink
change(label): color selection for archived now is applied when isExp…
Browse files Browse the repository at this point in the history
…ired is set

- we don't have review_state == 'archived' yet
  • Loading branch information
ichim-david committed Nov 29, 2022
1 parent 7102ea2 commit 00c7999
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/UniversalCard/fragments/CardImage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
};
Expand Down

0 comments on commit 00c7999

Please sign in to comment.