Reduce idle timer updates and stabilize toolbox normalization
Some checks failed
Deploy Sokko G / deploy (push) Failing after 2s
Some checks failed
Deploy Sokko G / deploy (push) Failing after 2s
This commit is contained in:
parent
cce3f3c7f8
commit
c096cc07fe
3 changed files with 10 additions and 4 deletions
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue