fix: add delete button inside brand edit modal
All checks were successful
Deploy / deploy (push) Successful in 12s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
fahed
2026-03-09 14:28:38 +03:00
parent 64e377060f
commit 539c204bde

View File

@@ -297,7 +297,16 @@ export default function Brands() {
</div>
)}
<div className="flex items-center justify-end gap-3 pt-4 border-t border-border">
<div className="flex items-center justify-between pt-4 border-t border-border">
{editingBrand && isSuperadminOrManager ? (
<button
onClick={() => { setShowModal(false); setBrandToDelete(editingBrand); setShowDeleteModal(true) }}
className="px-3 py-2 text-sm font-medium text-red-600 hover:bg-red-50 rounded-lg transition-colors"
>
{t('common.delete')}
</button>
) : <div />}
<div className="flex items-center gap-3">
<button
onClick={() => { setShowModal(false); setEditingBrand(null) }}
className="px-4 py-2 text-sm font-medium text-text-secondary hover:bg-surface-tertiary rounded-lg"
@@ -313,6 +322,7 @@ export default function Brands() {
</button>
</div>
</div>
</div>
</Modal>
{/* Delete Confirmation */}