@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.cjs.js
CHANGED
|
@@ -593,19 +593,24 @@ var AuthProvider = function AuthProvider(_ref) {
|
|
|
593
593
|
user = _useLocalStorage2[0],
|
|
594
594
|
setUser = _useLocalStorage2[1];
|
|
595
595
|
React.useEffect(function () {
|
|
596
|
-
console.log(children);
|
|
597
596
|
var publicPaths = new Set(defaultPublicUrlList);
|
|
598
597
|
var extractPublicPaths = function extractPublicPaths(child) {
|
|
598
|
+
var parentPath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
599
599
|
if (/*#__PURE__*/React.isValidElement(child)) {
|
|
600
|
-
|
|
601
|
-
|
|
600
|
+
var currentPath = "".concat(parentPath).concat(child.props.path || '');
|
|
601
|
+
if (child.props.isPublic) {
|
|
602
|
+
publicPaths.add(currentPath);
|
|
602
603
|
}
|
|
603
604
|
if (child.props.children) {
|
|
604
|
-
React.Children.forEach(child.props.children,
|
|
605
|
+
React.Children.forEach(child.props.children, function (grandchild) {
|
|
606
|
+
return extractPublicPaths(grandchild, currentPath);
|
|
607
|
+
});
|
|
605
608
|
}
|
|
606
609
|
}
|
|
607
610
|
};
|
|
608
|
-
React.Children.forEach(children,
|
|
611
|
+
React.Children.forEach(children, function (child) {
|
|
612
|
+
return extractPublicPaths(child);
|
|
613
|
+
});
|
|
609
614
|
debugger;
|
|
610
615
|
setPublicPathSet(publicPaths);
|
|
611
616
|
}, [children]);
|