@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.cjs.js
CHANGED
|
@@ -594,14 +594,21 @@ var AuthProvider = function AuthProvider(_ref) {
|
|
|
594
594
|
setUser = _useLocalStorage2[1];
|
|
595
595
|
React.useEffect(function () {
|
|
596
596
|
console.log(children);
|
|
597
|
+
var publicPaths = new Set(defaultPublicUrlList);
|
|
598
|
+
var extractPublicPaths = function extractPublicPaths(child) {
|
|
599
|
+
if (/*#__PURE__*/React.isValidElement(child)) {
|
|
600
|
+
if (child.props.isPublic && child.props.path) {
|
|
601
|
+
publicPaths.add(child.props.path);
|
|
602
|
+
}
|
|
603
|
+
if (child.props.children) {
|
|
604
|
+
React.Children.forEach(child.props.children, extractPublicPaths);
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
};
|
|
608
|
+
React.Children.forEach(children, extractPublicPaths);
|
|
609
|
+
debugger;
|
|
610
|
+
setPublicPathSet(publicPaths);
|
|
597
611
|
}, [children]);
|
|
598
|
-
React.Children.forEach(children, function (child) {
|
|
599
|
-
// Check if child is a valid React element
|
|
600
|
-
if (/*#__PURE__*/React.isValidElement(child) && child.props.isPublic) {
|
|
601
|
-
debugger;
|
|
602
|
-
publicPaths.add(child.props.path); // Assumes `path` is passed as prop
|
|
603
|
-
}
|
|
604
|
-
});
|
|
605
612
|
|
|
606
613
|
/**
|
|
607
614
|
* Logs in the user by saving their data to local storage and navigating to the admin page.
|