MCPcopy Create free account
hub / github.com/IvanAdmaers/react-roulette-pro / prepare

Function prepare

example/src/App.js:231–239  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

229 }
230
231 const prepare = async () => {
232 const newPrizeIndex = await API.getPrizeIndex();
233 setPrizeIndex(newPrizeIndex);
234 setStart(false);
235
236 const { id } = prizeList[newPrizeIndex];
237
238 Toast.fire({ icon: 'info', title: `Must win id - ${id}` });
239 };
240
241 prepare();
242 }, [spinning, prizeList]);

Callers 1

AppFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected