Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 6438 Rev 6439
Línea 12... Línea 12...
12
import styles from './survey.module.scss'
12
import styles from './survey.module.scss'
Línea 13... Línea 13...
13
 
13
 
14
const SurveyForm = ({
14
const SurveyForm = ({
15
  question,
15
  question,
-
 
16
  answers = [],
16
  answers = [],
17
  votes = [],
17
  active,
18
  active,
18
  time,
19
  time,
19
  resultType,
20
  resultType,
20
  voteUrl,
21
  voteUrl,
Línea 71... Línea 72...
71
 
72
 
72
  function addZero(unit) {
73
  function addZero(unit) {
73
    return String(unit).padStart(2, '0')
74
    return String(unit).padStart(2, '0')
Línea -... Línea 75...
-
 
75
  }
-
 
76
 
-
 
77
  function getPorcentage(n, total) {
-
 
78
    return (n * total) / 100
74
  }
79
  }
75
 
80
 
Línea 76... Línea 81...
76
  useEffect(() => {
81
  useEffect(() => {
77
    setRemainingTime(getTimeDiff(time))
82
    setRemainingTime(getTimeDiff(time))
Línea 107... Línea 112...
107
                isActive
112
                isActive
108
                  ? styles.survey_input
113
                  ? styles.survey_input
109
                  : styles.survey_input + ' ' + styles.disabled
114
                  : styles.survey_input + ' ' + styles.disabled
110
              }
115
              }
111
              key={index}
116
              key={index}
-
 
117
              data-width={50}
112
            >
118
            >
113
              <input
119
              <input
114
                type="radio"
120
                type="radio"
115
                name="vote"
121
                name="vote"
116
                id={`vote-${index + 1}`}
122
                id={`vote-${index + 1}`}