mirror of
https://github.com/henrygd/beszel.git
synced 2026-04-26 14:31:50 +02:00
fix(hub): prevent clearing all containers when single system update is empty (#1620)
This commit is contained in:
@@ -57,8 +57,13 @@ export default function ContainersTable({ systemId }: { systemId?: string }) {
|
|||||||
.then(
|
.then(
|
||||||
({ items }) => {
|
({ items }) => {
|
||||||
if (items.length === 0) {
|
if (items.length === 0) {
|
||||||
setData([]);
|
setData((curItems) => {
|
||||||
return;
|
if (systemId) {
|
||||||
|
return curItems?.filter((item) => item.system !== systemId) ?? []
|
||||||
|
}
|
||||||
|
return []
|
||||||
|
})
|
||||||
|
return
|
||||||
}
|
}
|
||||||
setData((curItems) => {
|
setData((curItems) => {
|
||||||
const lastUpdated = Math.max(items[0].updated, items.at(-1)?.updated ?? 0)
|
const lastUpdated = Math.max(items[0].updated, items.at(-1)?.updated ?? 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user