MCPcopy Index your code
hub / github.com/apache/answer / close

Function close

ui/src/hooks/useCaptchaModal/index.tsx:109–119  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

107 * In this case, call `await captchaModal.close()` and wait for the close action to complete.
108 */
109 const close = () => {
110 setStateShow(false);
111 resetCapture();
112 resetImgCode();
113 resetCallback();
114
115 const p = new Promise<void>((resolve) => {
116 setTimeout(resolve, 50);
117 });
118 return p;
119 };
120
121 const handleCaptchaError = (fel: FieldError[] = []) => {
122 const captchaErr = fel.find((o) => {

Callers 5

CloseMethod · 0.85
handleCaptchaErrorFunction · 0.85
IndexFunction · 0.85

Calls 3

resetCaptureFunction · 0.85
resetImgCodeFunction · 0.85
resetCallbackFunction · 0.85

Tested by 2