Skip to content

Commit c8295f9

Browse files
committed
chore: cleaned up HSParam.js
removed export of DEFAULT_NODES that was originally used by actions.js removed duplicate definition of DEFAULT_NODES
1 parent de24d8f commit c8295f9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/algorithms/parameters/HSParam.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { withAlgorithmParams } from './helpers/urlHelpers' // Import this for UR
1010
import { URLContext } from '../../context/urlState.js';
1111
import '../../styles/Param.scss';
1212

13-
13+
// export const DEFAULT_NODES = genRandNumList(12, 1, 50);
1414
const DEFAULT_NODES = genRandNumList(10, 1, 100);
1515
const HEAP_SORT = 'Heap Sort';
1616
const HEAP_SORT_EXAMPLE = 'Please follow the example provided: 0,1,2,3,4';
@@ -20,13 +20,13 @@ function HeapsortParam({ list }) { // add the parsing parameters for your algori
2020
// const { alg, mode, param } = useUrlParams();
2121
// const {list, value, xyCoords, edgeWeights, start, end, string, pattern, union} = parseParam(param);
2222
// const { alg, mode, list } = withAlgorithmParams(HeapsortParam);
23-
const DEFAULT_NODES = genRandNumList.bind(null, 12, 1, 50); // Define the default list of nodes
23+
// const DEFAULT_NODES = genRandNumList.bind(null, 12, 1, 50); // Define the default list of nodes
2424
const [localNodes, setLocalNodes] = useState(list || DEFAULT_NODES);
2525
const [message, setMessage] = useState(null);
2626
const { setNodes } = useContext(URLContext);
2727

2828
useEffect(() => {
29-
setNodes(localNodes);
29+
setNodes(localNodes);
3030
}, [localNodes]);
3131

3232
return (

0 commit comments

Comments
 (0)