MCPcopy Create free account
hub / github.com/OneBitCodeBlog/onebitlife / LifeStatus

Function LifeStatus

src/Components/Common/LifeStatus/index.jsx:7–43  ·  view source on GitHub ↗
({
  mindHabit,
  moneyHabit,
  bodyHabit,
  funHabit,
})

Source from the content-addressed store, hash-verified

5import AnimationService from "../../../Services/AnimationService";
6
7export 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
45const styles = StyleSheet.create({
46 container: {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected