Skip to content

Commit 54e4c6f

Browse files
committed
fix(ui): restore useMemo on existingKeys — it is observed by useAvailableResources
1 parent 1235b22 commit 54e4c6f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-tabs

apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-tabs/resource-tabs.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,10 @@ export function ResourceTabs({
334334
anchorIdRef.current = null
335335
}
336336

337-
const existingKeys = new Set(resources.map((r) => `${r.type}:${r.id}`))
337+
const existingKeys = useMemo(
338+
() => new Set(resources.map((r) => `${r.type}:${r.id}`)),
339+
[resources]
340+
)
338341

339342
const handleAdd = useCallback(
340343
(resource: MothershipResource) => {

0 commit comments

Comments
 (0)