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

Function handleCheck

src/Components/Home/EditHabit/index.jsx:22–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20 }
21
22 function handleCheck() {
23 if (habitCheck === 0) {
24 CheckService.checkHabit({
25 lastCheck: formatDate,
26 habitIsChecked: 1,
27 habitChecks: habit?.habitChecks + 1,
28 habitArea: habit?.habitArea,
29 });
30
31 setHabitCheck(1);
32 }
33 }
34
35 useEffect(() => {
36 setHabitCheck(habit?.habitIsChecked);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected