mirror of
https://codeberg.org/MarkusThielker/finances.git
synced 2025-04-12 05:08:43 +00:00
commit
6a94e4ecd8
1 changed files with 9 additions and 1 deletions
|
@ -50,7 +50,15 @@ export const columns = (
|
||||||
header: 'Category',
|
header: 'Category',
|
||||||
cell: ({row}) => {
|
cell: ({row}) => {
|
||||||
const category = categories.find((category) => category.id === row.original.categoryId);
|
const category = categories.find((category) => category.id === row.original.categoryId);
|
||||||
return category?.name ?? '-';
|
return (
|
||||||
|
<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">
|
||||||
|
<circle cx="10" cy="10" r="10"/>
|
||||||
|
</svg>
|
||||||
|
<p>{category?.name ?? '-'}</p>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue