@hcaptcha/react-hcaptcha
Advanced tools
Comparing version 0.3.5 to 0.3.6
@@ -222,2 +222,6 @@ "use strict"; | ||
}, function () { | ||
// trigger onLoad if it exists | ||
var onLoad = _this3.props.onLoad; | ||
if (onLoad) onLoad(); // render captcha | ||
_this3.renderCaptcha(); | ||
@@ -224,0 +228,0 @@ }); |
{ | ||
"name": "@hcaptcha/react-hcaptcha", | ||
"version": "0.3.5", | ||
"version": "0.3.6", | ||
"types": "types/index.d.ts", | ||
"main": "dist/index.js", | ||
"files": [ | ||
"src", | ||
"dist", | ||
"types/index.d.ts" | ||
], | ||
"description": "A React library for hCaptcha", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
@@ -7,0 +13,0 @@ "start": "webpack-dev-server --config ./webpack.config.js --mode development", |
@@ -36,9 +36,2 @@ # React hCaptcha Component Library | ||
#### Usage with TypeScript | ||
Add the types from DefinitelyTyped | ||
``` | ||
npm i -D @types/hcaptcha__react-hcaptcha | ||
``` | ||
**A note about TypeScript usage:** If you want to reassign the component name, you could consider making a util that imports the component, then re-exports it as a default. Example: | ||
@@ -90,2 +83,3 @@ | ||
|`onExpire`|-|When the current token expires.| | ||
|`onLoad`|-|When the hCaptcha API loads.| | ||
@@ -92,0 +86,0 @@ ### Methods |
@@ -158,2 +158,7 @@ const React = require('react'); | ||
this.setState({ isApiReady: true }, () => { | ||
// trigger onLoad if it exists | ||
const { onLoad } = this.props; | ||
if (onLoad) onLoad(); | ||
// render captcha | ||
this.renderCaptcha(); | ||
@@ -160,0 +165,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
1
30821
8
483
130