@yourself_id/siwys-react-js 0.16.0 → 0.16.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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -919,7 +919,7 @@ var SiwysButton = function(_param) {
|
|
|
919
919
|
}, props));
|
|
920
920
|
};
|
|
921
921
|
// src/components/signin/SignInWithYourSelf.tsx
|
|
922
|
-
import React17, { useState as useState2, useEffect } from "react";
|
|
922
|
+
import React17, { useState as useState2, useEffect, useCallback } from "react";
|
|
923
923
|
import styled4 from "styled-components";
|
|
924
924
|
// src/components/signin/QrCode.tsx
|
|
925
925
|
import React16 from "react";
|
|
@@ -1032,6 +1032,16 @@ var SignInWithYourSelf = function(param) {
|
|
|
1032
1032
|
var appStoreURL = "https://apps.apple.com/us/app/self-id/id1663745416";
|
|
1033
1033
|
window.open(appStoreURL, "_blank");
|
|
1034
1034
|
};
|
|
1035
|
+
var defaultSiwysClick = useCallback(function() {
|
|
1036
|
+
if (onSiwysPress) {
|
|
1037
|
+
onSiwysPress();
|
|
1038
|
+
return;
|
|
1039
|
+
}
|
|
1040
|
+
window.open(challengeUrl, "_blank");
|
|
1041
|
+
}, [
|
|
1042
|
+
challengeUrl,
|
|
1043
|
+
onSiwysPress
|
|
1044
|
+
]);
|
|
1035
1045
|
if (isAuthenticated) {
|
|
1036
1046
|
return /* @__PURE__ */ React17.createElement(Wrapper, null, successComponent);
|
|
1037
1047
|
}
|
|
@@ -1057,11 +1067,11 @@ var SignInWithYourSelf = function(param) {
|
|
|
1057
1067
|
level: "H"
|
|
1058
1068
|
})), isCYS ? /* @__PURE__ */ React17.createElement(CysButton, {
|
|
1059
1069
|
colorTheme: theme,
|
|
1060
|
-
onClick:
|
|
1070
|
+
onClick: defaultSiwysClick,
|
|
1061
1071
|
glow: true
|
|
1062
1072
|
}) : /* @__PURE__ */ React17.createElement(SiwysButton, {
|
|
1063
1073
|
colorTheme: theme,
|
|
1064
|
-
onClick:
|
|
1074
|
+
onClick: defaultSiwysClick,
|
|
1065
1075
|
glow: true
|
|
1066
1076
|
})), /* @__PURE__ */ React17.createElement(InstructionsContainer, null, /* @__PURE__ */ React17.createElement(InstructionsTitle, {
|
|
1067
1077
|
$theme: theme
|