feat: conditionally render delete button based on category code

This commit is contained in:
fredy.siswanto 2025-03-13 11:11:33 +07:00
parent c89731e124
commit 8a9cacf7b4

View File

@ -68,15 +68,19 @@ export const CategoriesPage = () => {
>
<PencilSquareIcon className="h-4 w-4" />
</Button>
<Button
type="button"
size="icon"
variant="newsDanger"
onClick={() => setSelectedCategory(data)}
title="Hapus Kategori"
>
<TrashIcon className="h-4 w-4" />
</Button>
{data.code === 'spotlight' ? (
''
) : (
<Button
type="button"
size="icon"
variant="newsDanger"
onClick={() => setSelectedCategory(data)}
title="Hapus Kategori"
>
<TrashIcon className="h-4 w-4" />
</Button>
)}
</div>
),
}