N-FIN-49: show clear column if no category selected

This commit is contained in:
Markus Thielker 2024-03-17 12:04:38 +01:00
parent 50b8ba399d
commit d5c4f02871
No known key found for this signature in database

View file

@ -55,6 +55,9 @@ export const columns = (
cell: ({row}) => {
const category = categories.find((category) => category.id === row.original.categoryId);
return (
<>
{
category && (
<div className="flex items-center space-x-4">
<svg className="h-5" fill={category?.color} viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg">
@ -62,6 +65,9 @@ export const columns = (
</svg>
<p>{category?.name ?? '-'}</p>
</div>
)
}
</>
);
},
size: 200,