Skip to content

Commit de24d8f

Browse files
committed
fix: removd import statement in actions.js
Reduced coupling between actions.js and HSParam.js by replacing the DEFAULT_NODES import statement in action.js with: const DEFAULT_NODES = genRandNumList(12, 1, 50);
1 parent c9122a6 commit de24d8f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/context/actions.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ import React, { useState } from 'react';
1010
import { onCollapseChange } from '../algorithms/controllers/collapseChunkPlugin';
1111
import { onCollapseStateChange } from '../algorithms/controllers/transitiveClosureCollapseChunkPlugin';
1212
import { unionFindToggleRank } from '../algorithms/controllers/unionFindUnion';
13+
import { genRandNumList } from '../algorithms/parameters/helpers/ParamHelper';
1314

1415
const DEFAULT_ALGORITHM = 'heapSort';
1516
const DEFAULT_MODE = 'sort';
16-
const DEFAULT_PARAM = DEFAULT_NODES; // maybe for other algorithms
17-
import DEFAULT_NODES from '../algorithms/parameters/HSParam.js';
17+
// const DEFAULT_PARAM = DEFAULT_NODES; // maybe for other algorithms
18+
// import { DEFAULT_NODES } from '../algorithms/parameters/HSParam';
19+
const DEFAULT_NODES = genRandNumList(12, 1, 50);
1820

1921
// const DEFAULT_ALGORITHM = 'binarySearchTree';
2022
// const DEFAULT_MODE = 'insertion';

0 commit comments

Comments
 (0)