@veripass/react-sdk 1.0.13 → 1.0.14
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.esm.js
CHANGED
|
@@ -559,8 +559,9 @@ var AuthContext = /*#__PURE__*/createContext();
|
|
|
559
559
|
* @returns {JSX.Element} The provider component for AuthContext.
|
|
560
560
|
*/
|
|
561
561
|
var AuthProvider = function AuthProvider(_ref) {
|
|
562
|
-
var children = _ref.children
|
|
563
|
-
_ref.publicUrls
|
|
562
|
+
var children = _ref.children,
|
|
563
|
+
_ref$publicUrls = _ref.publicUrls,
|
|
564
|
+
publicUrls = _ref$publicUrls === void 0 ? [] : _ref$publicUrls;
|
|
564
565
|
var _useState = useState(defaulPublicUrlList),
|
|
565
566
|
_useState2 = _slicedToArray(_useState, 2),
|
|
566
567
|
publicUrlsList = _useState2[0],
|
|
@@ -626,10 +627,10 @@ var AuthProvider = function AuthProvider(_ref) {
|
|
|
626
627
|
return JSON.parse(value);
|
|
627
628
|
};
|
|
628
629
|
|
|
629
|
-
// Effect to update public URLs whenever
|
|
630
|
+
// Effect to update public URLs whenever publicUrls prop changes
|
|
630
631
|
useEffect(function () {
|
|
631
|
-
setPublicUrlsList([].concat(_toConsumableArray(defaultPublicUrlList), _toConsumableArray(
|
|
632
|
-
}, [
|
|
632
|
+
setPublicUrlsList([].concat(_toConsumableArray(defaultPublicUrlList), _toConsumableArray(publicUrls)));
|
|
633
|
+
}, [publicUrls]);
|
|
633
634
|
|
|
634
635
|
// Effect to redirect if user is null
|
|
635
636
|
useEffect(function () {
|