@veripass/react-sdk 1.0.14 → 1.0.15
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
CHANGED
|
@@ -563,7 +563,7 @@ var useLocalStorage = function useLocalStorage(keyName, defaultValue) {
|
|
|
563
563
|
return [storedValue, setValue];
|
|
564
564
|
};
|
|
565
565
|
|
|
566
|
-
var
|
|
566
|
+
var defaultPublicUrlList = ['/auth/login', '/auth/signup'];
|
|
567
567
|
|
|
568
568
|
/**
|
|
569
569
|
* Authentication context used to provide user authentication data and functions.
|
|
@@ -582,7 +582,7 @@ var AuthProvider = function AuthProvider(_ref) {
|
|
|
582
582
|
var children = _ref.children,
|
|
583
583
|
_ref$publicUrls = _ref.publicUrls,
|
|
584
584
|
publicUrls = _ref$publicUrls === void 0 ? [] : _ref$publicUrls;
|
|
585
|
-
var _useState = React.useState(
|
|
585
|
+
var _useState = React.useState(defaultPublicUrlList),
|
|
586
586
|
_useState2 = _slicedToArray(_useState, 2),
|
|
587
587
|
publicUrlsList = _useState2[0],
|
|
588
588
|
setPublicUrlsList = _useState2[1];
|
|
@@ -649,7 +649,7 @@ var AuthProvider = function AuthProvider(_ref) {
|
|
|
649
649
|
|
|
650
650
|
// Effect to update public URLs whenever publicUrls prop changes
|
|
651
651
|
React.useEffect(function () {
|
|
652
|
-
setPublicUrlsList([].concat(
|
|
652
|
+
setPublicUrlsList([].concat(defaultPublicUrlList, _toConsumableArray(publicUrls)));
|
|
653
653
|
}, [publicUrls]);
|
|
654
654
|
|
|
655
655
|
// Effect to redirect if user is null
|