@captchafox/react 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +6 -2
- package/dist/index.js +6 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -127,7 +127,7 @@ var CaptchaFox = (0, import_react.forwardRef)(
|
|
|
127
127
|
console.warn("[CaptchaFox] Widget has not been loaded");
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
130
|
-
setWidgetId(
|
|
130
|
+
setWidgetId(void 0);
|
|
131
131
|
window.captchafox.remove(widgetId);
|
|
132
132
|
},
|
|
133
133
|
execute: () => {
|
|
@@ -140,6 +140,11 @@ var CaptchaFox = (0, import_react.forwardRef)(
|
|
|
140
140
|
},
|
|
141
141
|
[widgetId]
|
|
142
142
|
);
|
|
143
|
+
(0, import_react.useEffect)(() => {
|
|
144
|
+
if (widgetId) {
|
|
145
|
+
onLoad == null ? void 0 : onLoad();
|
|
146
|
+
}
|
|
147
|
+
}, [widgetId]);
|
|
143
148
|
const renderCaptcha = () => __async(void 0, null, function* () {
|
|
144
149
|
var _a, _b, _c;
|
|
145
150
|
(_a = window.captchafox) == null ? void 0 : _a.remove(widgetId);
|
|
@@ -157,7 +162,6 @@ var CaptchaFox = (0, import_react.forwardRef)(
|
|
|
157
162
|
onVerify
|
|
158
163
|
});
|
|
159
164
|
setWidgetId(newWidgetId);
|
|
160
|
-
onLoad == null ? void 0 : onLoad();
|
|
161
165
|
});
|
|
162
166
|
(0, import_react.useEffect)(() => {
|
|
163
167
|
if (!containerRef)
|
package/dist/index.js
CHANGED
|
@@ -91,7 +91,7 @@ var CaptchaFox = forwardRef(
|
|
|
91
91
|
console.warn("[CaptchaFox] Widget has not been loaded");
|
|
92
92
|
return;
|
|
93
93
|
}
|
|
94
|
-
setWidgetId(
|
|
94
|
+
setWidgetId(void 0);
|
|
95
95
|
window.captchafox.remove(widgetId);
|
|
96
96
|
},
|
|
97
97
|
execute: () => {
|
|
@@ -104,6 +104,11 @@ var CaptchaFox = forwardRef(
|
|
|
104
104
|
},
|
|
105
105
|
[widgetId]
|
|
106
106
|
);
|
|
107
|
+
useEffect(() => {
|
|
108
|
+
if (widgetId) {
|
|
109
|
+
onLoad == null ? void 0 : onLoad();
|
|
110
|
+
}
|
|
111
|
+
}, [widgetId]);
|
|
107
112
|
const renderCaptcha = () => __async(void 0, null, function* () {
|
|
108
113
|
var _a, _b, _c;
|
|
109
114
|
(_a = window.captchafox) == null ? void 0 : _a.remove(widgetId);
|
|
@@ -121,7 +126,6 @@ var CaptchaFox = forwardRef(
|
|
|
121
126
|
onVerify
|
|
122
127
|
});
|
|
123
128
|
setWidgetId(newWidgetId);
|
|
124
|
-
onLoad == null ? void 0 : onLoad();
|
|
125
129
|
});
|
|
126
130
|
useEffect(() => {
|
|
127
131
|
if (!containerRef)
|