Explorar el Código

redundant comments removed

miskson hace 2 años
padre
commit
4234b3b8db
Se han modificado 1 ficheros con 0 adiciones y 8 borrados
  1. 0 8
      hw19-react-jsx-homework/src/App.js

+ 0 - 8
hw19-react-jsx-homework/src/App.js

@@ -130,16 +130,8 @@ const TimerContainer = ({seconds=1800, refresh=100, render:Component}) => {
   let [time=seconds*1000, setTime] = useState()
   useEffect(() => {
     const interval = setInterval(()=> {
-      // if(time > 0) {
-      //   setTime(seconds*1000 - timePassed)
-      //   setTimePassed(timePassed + refresh)
-
-      // } else {
-      //   return clearInterval(interval);
-      // }
       time > 0? setTime(seconds*1000 - timePassed) : clearInterval(interval)
       setTimePassed(timePassed + refresh)
-
     },refresh)
     return() => clearInterval(interval)
   }, [refresh, time, timePassed, setTimePassed])