style: auto-fix lint and format
This commit is contained in:
1 parent
d6ced037df
commit
569293275d
1 file changed
+13
-16
@@ -50,24 +50,21 @@ export default function BeszelAlertsWidget({
|
||||
clientApi.widget.beszel.subscribeAlerts.useSubscription(alertsInput, {
|
||||
enabled: !isEditMode,
|
||||
onData(data) {
|
||||
utils.widget.beszel.getAlerts.setData(alertsInput,
|
||||
(prev) => {
|
||||
if (!prev) return prev;
|
||||
return prev.map((r) =>
|
||||
r.integrationId === data.integrationId
|
||||
? {
|
||||
...r,
|
||||
alerts: data.alerts.alerts,
|
||||
history: data.alerts.history,
|
||||
updatedAt: data.timestamp,
|
||||
}
|
||||
: r,
|
||||
);
|
||||
},
|
||||
utils.widget.beszel.getAlerts.setData(alertsInput, (prev) => {
|
||||
if (!prev) return prev;
|
||||
return prev.map((r) =>
|
||||
r.integrationId === data.integrationId
|
||||
? {
|
||||
...r,
|
||||
alerts: data.alerts.alerts,
|
||||
history: data.alerts.history,
|
||||
updatedAt: data.timestamp,
|
||||
}
|
||||
: r,
|
||||
);
|
||||
},
|
||||
});
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
const systemNameMap = useMemo(() => {
|
||||
const map: Record<string, string> = {};
|
||||
|
||||
Reference in new issue
Block a user