@veripass/react-sdk 1.0.15 → 1.0.16
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 +14 -7
- package/dist/react-sdk.cjs.js.map +1 -1
- package/dist/react-sdk.esm.js +14 -7
- package/dist/react-sdk.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/react-sdk.esm.js
CHANGED
|
@@ -574,14 +574,21 @@ var AuthProvider = function AuthProvider(_ref) {
|
|
|
574
574
|
setUser = _useLocalStorage2[1];
|
|
575
575
|
useEffect(function () {
|
|
576
576
|
console.log(children);
|
|
577
|
+
var publicPaths = new Set(defaultPublicUrlList);
|
|
578
|
+
var extractPublicPaths = function extractPublicPaths(child) {
|
|
579
|
+
if (/*#__PURE__*/React__default.isValidElement(child)) {
|
|
580
|
+
if (child.props.isPublic && child.props.path) {
|
|
581
|
+
publicPaths.add(child.props.path);
|
|
582
|
+
}
|
|
583
|
+
if (child.props.children) {
|
|
584
|
+
React__default.Children.forEach(child.props.children, extractPublicPaths);
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
};
|
|
588
|
+
React__default.Children.forEach(children, extractPublicPaths);
|
|
589
|
+
debugger;
|
|
590
|
+
setPublicPathSet(publicPaths);
|
|
577
591
|
}, [children]);
|
|
578
|
-
React__default.Children.forEach(children, function (child) {
|
|
579
|
-
// Check if child is a valid React element
|
|
580
|
-
if (/*#__PURE__*/React__default.isValidElement(child) && child.props.isPublic) {
|
|
581
|
-
debugger;
|
|
582
|
-
publicPaths.add(child.props.path); // Assumes `path` is passed as prop
|
|
583
|
-
}
|
|
584
|
-
});
|
|
585
592
|
|
|
586
593
|
/**
|
|
587
594
|
* Logs in the user by saving their data to local storage and navigating to the admin page.
|