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

Function handleSettingsChange

example/src/App.js:244–256  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

242 }, [spinning, prizeList]);
243
244 const handleSettingsChange = (e) => {
245 const { dataset, value, checked } = e.target;
246 const { param } = dataset;
247
248 const newValue = checked !== undefined ? checked : value;
249
250 const newParam = { ...settings[param] };
251 newParam.value = newValue;
252
253 setSettings((prevState) => ({ ...prevState, [param]: newParam }));
254
255 window.scrollTo({ top: 0, behavior: 'smooth' });
256 };
257
258 const handleStart = () => {
259 setSpinning(true);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected