Browse Source

redundant comments removed

miskson 2 years ago
parent
commit
4234b3b8db
1 changed files with 0 additions and 8 deletions
  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])