feat: conditionally render delete button based on category code
This commit is contained in:
parent
c89731e124
commit
8a9cacf7b4
@ -68,15 +68,19 @@ export const CategoriesPage = () => {
|
|||||||
>
|
>
|
||||||
<PencilSquareIcon className="h-4 w-4" />
|
<PencilSquareIcon className="h-4 w-4" />
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
{data.code === 'spotlight' ? (
|
||||||
type="button"
|
''
|
||||||
size="icon"
|
) : (
|
||||||
variant="newsDanger"
|
<Button
|
||||||
onClick={() => setSelectedCategory(data)}
|
type="button"
|
||||||
title="Hapus Kategori"
|
size="icon"
|
||||||
>
|
variant="newsDanger"
|
||||||
<TrashIcon className="h-4 w-4" />
|
onClick={() => setSelectedCategory(data)}
|
||||||
</Button>
|
title="Hapus Kategori"
|
||||||
|
>
|
||||||
|
<TrashIcon className="h-4 w-4" />
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user