From 0eb2c41fd755e6be76aefdedb4749cf2ff2ef52c Mon Sep 17 00:00:00 2001 From: Val Erastov Date: Tue, 28 Jun 2022 18:39:46 -0700 Subject: [PATCH] fix react hooks ordering --- web/app/sketcher/components/ContextualControls.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app/sketcher/components/ContextualControls.jsx b/web/app/sketcher/components/ContextualControls.jsx index d9d4fe7a..bc9d163f 100644 --- a/web/app/sketcher/components/ContextualControls.jsx +++ b/web/app/sketcher/components/ContextualControls.jsx @@ -16,11 +16,11 @@ export function ContextualControls() { const ___ = useStream(ctx => ctx.viewer.parametricManager.$update); const ctx = useContext(SketcherAppContext); + const [modification, setModification] = useState(0); if (selection.length === 0) { return null; } - const [modification, setModification] = useState(0); const obj = selection.length === 1 ? selection[0] : null; const availableActions = matchAvailableActions(selection);