From 3db3720eef71be60a73b3ceba0241fa15babfe68 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Wed, 5 Aug 2020 21:55:48 +0300 Subject: [PATCH] CollectionList: show colorbox when color is available. --- src/Collections/CollectionList.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Collections/CollectionList.tsx b/src/Collections/CollectionList.tsx index 46c1402..a484794 100644 --- a/src/Collections/CollectionList.tsx +++ b/src/Collections/CollectionList.tsx @@ -18,6 +18,7 @@ import Container from "../widgets/Container"; import { routeResolver } from "../App"; import { CachedCollection } from "../Pim/helpers"; +import ColorBox from "../widgets/ColorBox"; interface PropsType { collections: CachedCollection[]; @@ -38,7 +39,10 @@ export default function CollectionList(props: PropsType) { for (const col of props.collections) { if (collectionMap[col.metadata.type]) { - const colorBox = undefined; // FIXME + const colorBox = (col.metadata.color) ? ( + + ) : undefined; + collectionMap[col.metadata.type].push(( colClicked(col.collection.uid)}>