Explorar el Código

set all initial setting states to false

Bernadette Elena Hammerle hace 2 años
padre
commit
c2c86ae0b0
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. 1 1
      src/Addition.js
  2. 1 1
      src/Subtraction.js

+ 1 - 1
src/Addition.js

@@ -18,7 +18,7 @@ function Addition() {
   const [resultsGrid, setResultsGrid] = useState([{id: 1, number: ""}]); // calculated result
   const [stepsGrid, setStepsGrid] = useState([{id: 1, step: ""}]); // one step for every digit
   const [autoMoveComma, setAutoMoveComma] = useState(false); // move the comma automatically
-  const [allowStartOver, setAllowStartOver] = useState(true); // show steps and allow restart
+  const [allowStartOver, setAllowStartOver] = useState(false); // show steps and allow restart
 
   let calculationInput = useRef(null);
   useEffect(()=>{

+ 1 - 1
src/Subtraction.js

@@ -18,7 +18,7 @@ function Subtraction() {
   const [resultsGrid, setResultsGrid] = useState([{id: 1, number: ""}]); // calculated result
   const [stepsGrid, setStepsGrid] = useState([{id: 1, step: ""}]); // one step for every digit
   const [autoMoveComma, setAutoMoveComma] = useState(false); // move the comma automatically
-  const [allowStartOver, setAllowStartOver] = useState(true); // show steps and allow restart
+  const [allowStartOver, setAllowStartOver] = useState(false); // show steps and allow restart
 
   let calculationInput = useRef(null);
   useEffect(()=>{