({
mindHabit,
moneyHabit,
bodyHabit,
funHabit,
})
| 5 | import AnimationService from "../../../Services/AnimationService"; |
| 6 | |
| 7 | export default function LifeStatus({ |
| 8 | mindHabit, |
| 9 | moneyHabit, |
| 10 | bodyHabit, |
| 11 | funHabit, |
| 12 | }) { |
| 13 | /*Status: |
| 14 | 100 - Máximo |
| 15 | 50 - Médio |
| 16 | 25 - baixo |
| 17 | 00 - Curto (Acabou o game) |
| 18 | No robô, nós temos primeiros Felicidade e depoisa Saúde xx-xx |
| 19 | */ |
| 20 | const [mind, setMind] = useState(); |
| 21 | const [money, setMoney] = useState(); |
| 22 | const [robot, setRobot] = useState(); |
| 23 | |
| 24 | useEffect(() => { |
| 25 | AnimationService.animationStatus( |
| 26 | mindHabit?.progressBar, |
| 27 | moneyHabit?.progressBar, |
| 28 | bodyHabit?.progressBar, |
| 29 | funHabit?.progressBar, |
| 30 | setMind, |
| 31 | setMoney, |
| 32 | setRobot |
| 33 | ); |
| 34 | }, [mindHabit, moneyHabit, bodyHabit, funHabit]); |
| 35 | |
| 36 | return ( |
| 37 | <View style={styles.container}> |
| 38 | <Lottie source={mind} autoPlay loop style={styles.educacaoAnimacao} /> |
| 39 | <Lottie source={money} autoPlay loop style={styles.financasAnimacao} /> |
| 40 | <Lottie source={robot} autoPlay loop style={styles.roboAnimacao} /> |
| 41 | </View> |
| 42 | ); |
| 43 | } |
| 44 | |
| 45 | const styles = StyleSheet.create({ |
| 46 | container: { |
nothing calls this directly
no outgoing calls
no test coverage detected