fix: show update button only when newer version available
This commit is contained in:
@@ -222,11 +222,13 @@ function CustomerDetail({ customerId }) {
|
||||
</button>
|
||||
) : (
|
||||
<>
|
||||
<button onClick={() => deploy(e.name, e.latest_version)}
|
||||
disabled={deploying === e.name}
|
||||
className="bg-blue-500 text-white px-3 py-1 rounded text-sm hover:bg-blue-600 disabled:opacity-50">
|
||||
{deploying === e.name ? '...' : 'עדכון'}
|
||||
</button>
|
||||
{hasUpdate && (
|
||||
<button onClick={() => deploy(e.name, e.latest_version)}
|
||||
disabled={deploying === e.name}
|
||||
className="bg-amber-500 text-white px-3 py-1 rounded text-sm hover:bg-amber-600 disabled:opacity-50">
|
||||
{deploying === e.name ? '...' : 'עדכון'}
|
||||
</button>
|
||||
)}
|
||||
<button onClick={() => remove(e.id)}
|
||||
className="bg-red-500 text-white px-3 py-1 rounded text-sm hover:bg-red-600">
|
||||
הסרה
|
||||
|
||||
Reference in New Issue
Block a user