feat(page): Optimize data handling with useMemo for boards, agents, and gateways

This commit is contained in:
Abhimanyu Saharan
2026-02-05 00:11:48 +05:30
parent 1889ac997e
commit 8f224910b5
6 changed files with 7 additions and 14 deletions

View File

@@ -53,7 +53,7 @@ export default function BoardsPage() {
refetchOnMount: "always",
});
const boards = boardsQuery.data ?? [];
const boards = useMemo(() => boardsQuery.data ?? [], [boardsQuery.data]);
const sortedBoards = useMemo(
() => [...boards].sort((a, b) => a.name.localeCompare(b.name)),
@@ -141,6 +141,7 @@ export default function BoardsPage() {
[]
);
// eslint-disable-next-line react-hooks/incompatible-library
const table = useReactTable({
data: sortedBoards,
columns,