@veripass/react-sdk 1.0.15 → 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.
@@ -573,15 +573,27 @@ var AuthProvider = function AuthProvider(_ref) {
573
573
  user = _useLocalStorage2[0],
574
574
  setUser = _useLocalStorage2[1];
575
575
  useEffect(function () {
576
- console.log(children);
576
+ var publicPaths = new Set(defaultPublicUrlList);
577
+ var extractPublicPaths = function extractPublicPaths(child) {
578
+ var parentPath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
579
+ if (/*#__PURE__*/React__default.isValidElement(child)) {
580
+ var currentPath = "".concat(parentPath).concat(child.props.path || '');
581
+ if (child.props.isPublic) {
582
+ publicPaths.add(currentPath);
583
+ }
584
+ if (child.props.children) {
585
+ React__default.Children.forEach(child.props.children, function (grandchild) {
586
+ return extractPublicPaths(grandchild, currentPath);
587
+ });
588
+ }
589
+ }
590
+ };
591
+ React__default.Children.forEach(children, function (child) {
592
+ return extractPublicPaths(child);
593
+ });
594
+ debugger;
595
+ setPublicPathSet(publicPaths);
577
596
  }, [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
597
 
586
598
  /**
587
599
  * Logs in the user by saving their data to local storage and navigating to the admin page.