feat: expand advanced widget experiences
This commit is contained in:
1 parent
55226842f9
commit
65a7e84bea
137 files changed
+3684
-850
No files matched your search
@@ -4,7 +4,7 @@ import { useMemo } from "react";
|
||||
|
||||
import type { BeszelSystemRow } from "./types";
|
||||
|
||||
type SystemRowWithKey = BeszelSystemRow & { _key: string };
|
||||
type SystemRowWithKey = BeszelSystemRow & { rowKey: string };
|
||||
|
||||
export const useBeszelFilteredSystems = (
|
||||
results: { integrationId: string; systems: BeszelSystemRow[] }[],
|
||||
@@ -13,7 +13,7 @@ export const useBeszelFilteredSystems = (
|
||||
const allSystems = useMemo(
|
||||
() =>
|
||||
results
|
||||
.flatMap((r) => r.systems.map((s) => ({ ...s, _key: `${r.integrationId}:${s.id}` })))
|
||||
.flatMap((r) => r.systems.map((s) => ({ ...s, rowKey: `${r.integrationId}:${s.id}` })))
|
||||
.toSorted((a, b) => a.name.localeCompare(b.name)),
|
||||
[results],
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user