Reduce idle timer updates and stabilize toolbox normalization
Some checks failed
Deploy Sokko G / deploy (push) Failing after 2s

This commit is contained in:
Shinuwa 2026-09-09 20:04:45 +02:00
parent cce3f3c7f8
commit c096cc07fe
3 changed files with 10 additions and 4 deletions

View file

@ -20,7 +20,8 @@ import {
} from "./goalTreeUtils.js";
export function useGoalTreeController({ toolboxId, moduleId, context, editing, setEditing, openEditor }) {
const data = context.normalizeGoalTreeData(context.getModuleData(toolboxId, moduleId, { nodes: [] }));
const rawData = context.getModuleData(toolboxId, moduleId, { nodes: [] });
const data = useMemo(() => context.normalizeGoalTreeData(rawData), [context, rawData]);
const textContent = context.moduleText?.goalTree || {};
const treeOrientation = data.orientation || "horizontal";
const verticalView = treeOrientation === "vertical";