MCPcopy
hub / github.com/srcbookdev/srcbook / setError

Function setError

packages/components/src/components/ui/heading.tsx:35–43  ·  view source on GitHub ↗
(error: string)

Source from the content-addressed store, hash-verified

33 }
34
35 function setError(error: string) {
36 if (timeoutRef.current) {
37 clearTimeout(timeoutRef.current);
38 }
39 _setError(error);
40 timeoutRef.current = setTimeout(() => {
41 _setError(null);
42 }, 3000) as unknown as number;
43 }
44
45 return (
46 <div>

Callers 2

EditableH1Function · 0.70
onSaveFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected