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

Function setError

packages/web/src/components/session-menu/secrets-panel.tsx:116–124  ·  view source on GitHub ↗
(error: string | null)

Source from the content-addressed store, hash-verified

114 const [error, _setError] = useState<string | null>(null);
115
116 function setError(error: string | null) {
117 if (error === null) {
118 _setError(null);
119 return;
120 }
121
122 _setError(error);
123 setTimeout(() => _setError(null), 5000);
124 }
125
126 function isValidSecret() {
127 return isValidSecretName(name) && value.length > 0;

Callers 8

onSubmitFunction · 0.70
onCreateSrcbookFromUrlFunction · 0.50
onChangeTabFunction · 0.50
onConfirmDeleteFunction · 0.50
generateFunction · 0.50
generateFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected