@veripass/react-sdk 1.0.16 → 1.0.17
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/react-sdk.cjs.js +10 -5
- package/dist/react-sdk.cjs.js.map +1 -1
- package/dist/react-sdk.esm.js +10 -5
- package/dist/react-sdk.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/react-sdk.esm.js
CHANGED
|
@@ -573,19 +573,24 @@ var AuthProvider = function AuthProvider(_ref) {
|
|
|
573
573
|
user = _useLocalStorage2[0],
|
|
574
574
|
setUser = _useLocalStorage2[1];
|
|
575
575
|
useEffect(function () {
|
|
576
|
-
console.log(children);
|
|
577
576
|
var publicPaths = new Set(defaultPublicUrlList);
|
|
578
577
|
var extractPublicPaths = function extractPublicPaths(child) {
|
|
578
|
+
var parentPath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
579
579
|
if (/*#__PURE__*/React__default.isValidElement(child)) {
|
|
580
|
-
|
|
581
|
-
|
|
580
|
+
var currentPath = "".concat(parentPath).concat(child.props.path || '');
|
|
581
|
+
if (child.props.isPublic) {
|
|
582
|
+
publicPaths.add(currentPath);
|
|
582
583
|
}
|
|
583
584
|
if (child.props.children) {
|
|
584
|
-
React__default.Children.forEach(child.props.children,
|
|
585
|
+
React__default.Children.forEach(child.props.children, function (grandchild) {
|
|
586
|
+
return extractPublicPaths(grandchild, currentPath);
|
|
587
|
+
});
|
|
585
588
|
}
|
|
586
589
|
}
|
|
587
590
|
};
|
|
588
|
-
React__default.Children.forEach(children,
|
|
591
|
+
React__default.Children.forEach(children, function (child) {
|
|
592
|
+
return extractPublicPaths(child);
|
|
593
|
+
});
|
|
589
594
|
debugger;
|
|
590
595
|
setPublicPathSet(publicPaths);
|
|
591
596
|
}, [children]);
|