Skip to content

Commit 57f871f

Browse files
committed
Minor Refactor
1 parent 4509b7f commit 57f871f

File tree

3 files changed

+4
-17
lines changed

3 files changed

+4
-17
lines changed

src/components/engine/Canvas/index.tsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,8 @@ import "./style.css";
1010
export function Canvas({
1111
baseId,
1212
}: CanvasModel) {
13-
const {
14-
nodeSystem,
15-
} = useNodeSystemContext()!;
16-
17-
const {
18-
newNode,
19-
} = useNodeFactoryContext()!;
20-
21-
const {
22-
removeNode,
23-
} = useNodeSystemContext()!;
13+
const { newNode } = useNodeFactoryContext()!;
14+
const { nodeSystem, removeNode } = useNodeSystemContext()!;
2415

2516
const nodes = nodeSystem[baseId]?.nodes || [];
2617

src/contexts/nodeSystem.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ const createNodeSystemContext = () => {
3131
const NodeSystemProvider = ({ children }: {
3232
children: ReactNode;
3333
}) => {
34-
const {
35-
setUnsavedChanges,
36-
} = useUnsavedChangesContext()!;
34+
const { setUnsavedChanges } = useUnsavedChangesContext()!;
3735

3836
const [entries, setEntries] = useState<string[]>([
3937
"ENTRY",

src/contexts/variables.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ const createVariablesContext = () => {
2929
const VariablesProvider = ({ children }: {
3030
children: ReactNode;
3131
}) => {
32-
const {
33-
requestPrompt,
34-
} = usePromptContext()!;
32+
const { requestPrompt } = usePromptContext()!;
3533

3634
const [stSet, setStSet] = useState<Set<string>>(new Set());
3735
const [ccSet, setCcSet] = useState<Set<string>>(new Set());

0 commit comments

Comments
 (0)