Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 6452 | Rev 6454 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 6452 Rev 6453
Línea 132... Línea 132...
132
  function addZero(unit) {
132
  function addZero(unit) {
133
    return String(unit).padStart(2, '0')
133
    return String(unit).padStart(2, '0')
134
  }
134
  }
Línea 135... Línea 135...
135
 
135
 
136
  function getPorcentage(n, total) {
136
  function getPorcentage(n, total) {
137
    return (n * total) / 100
137
    return (n / total) * 100
Línea 138... Línea 138...
138
  }
138
  }
139
 
139
 
Línea 153... Línea 153...
153
  }, [])
153
  }, [])
Línea 154... Línea 154...
154
 
154
 
155
  useEffect(() => {
155
  useEffect(() => {
156
    if (!votes) return
156
    if (!votes) return
157
    votes.forEach((vote) => (voteRef.current += Number(vote)))
-
 
158
    console.log(voteRef.current)
157
    votes.forEach((vote) => (voteRef.current += Number(vote)))
Línea 159... Línea 158...
159
  }, [])
158
  }, [])
160
 
159
 
161
  return (
160
  return (