MCPcopy Create free account
hub / github.com/triggerdotdev/jsonhero-web / updatePreferences

Function updatePreferences

app/components/IndentPreference.tsx:11–17  ·  view source on GitHub ↗
(e: React.ChangeEvent<HTMLInputElement>)

Source from the content-addressed store, hash-verified

9 const [preferences, setPreferences] = usePreferences();
10
11 const updatePreferences = (e: React.ChangeEvent<HTMLInputElement>) => {
12 let newIdent = Number(e.target.value);
13 if (newIdent < MIN_INDENT) newIdent = MIN_INDENT;
14 if (newIdent > MAX_INDENT) newIdent = MAX_INDENT;
15 e.target.value = newIdent.toString();
16 setPreferences({ ...preferences, indent: newIdent });
17 };
18
19 return (
20 <div className="flex items-center -mt-0.5">

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected