Skip to content

Commit be7aa4a

Browse files
binaricatclaude
andcommitted
fix: resolve eslint warnings in App.tsx and VaultView.tsx
- Remove unused sessionLog deps from useCallback in App.tsx - Wrap countAllHostsInNode in useCallback and add to useMemo deps Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f487209 commit be7aa4a

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,7 @@ function App({ settings }: { settings: SettingsState }) {
10731073
} else {
10741074
if (IS_DEV) console.log('[handleTerminalDataCapture] No matching log found!');
10751075
}
1076-
}, [sessions, connectionLogs, updateConnectionLog, sessionLogsEnabled, sessionLogsDir, sessionLogsFormat]);
1076+
}, [sessions, connectionLogs, updateConnectionLog]);
10771077

10781078
// Check if host has multiple protocols enabled
10791079
const hasMultipleProtocols = useCallback((host: Host) => {

components/VaultView.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -689,14 +689,14 @@ const VaultViewInner: React.FC<VaultViewProps> = ({
689689
],
690690
);
691691

692-
const countAllHostsInNode = (node: GroupNode): number => {
692+
const countAllHostsInNode = useCallback((node: GroupNode): number => {
693693
let count = node.hosts.length;
694694
Object.values(node.children).forEach((child) => {
695695
count += countAllHostsInNode(child);
696696
});
697697
node.totalHostCount = count;
698698
return count;
699-
};
699+
}, []);
700700

701701
const buildGroupTree = useMemo<Record<string, GroupNode>>(() => {
702702
const root: Record<string, GroupNode> = {};
@@ -725,7 +725,7 @@ const VaultViewInner: React.FC<VaultViewProps> = ({
725725
Object.values(root).forEach(countAllHostsInNode);
726726

727727
return root;
728-
}, [hosts, customGroups]);
728+
}, [hosts, customGroups, countAllHostsInNode]);
729729

730730
// Generate all possible group paths from the tree (including all intermediate nodes)
731731
const allGroupPaths = useMemo(() => {
@@ -912,7 +912,7 @@ const VaultViewInner: React.FC<VaultViewProps> = ({
912912
Object.values(root).forEach(countAllHostsInNode);
913913

914914
return root;
915-
}, [treeViewHosts, customGroups]);
915+
}, [treeViewHosts, customGroups, countAllHostsInNode]);
916916

917917
// Create tree view specific group tree that excludes ungrouped hosts
918918
const treeViewGroupTree = useMemo<GroupNode[]>(() => {

0 commit comments

Comments
 (0)