@panneau/auth 3.0.307 → 4.0.0
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/es/index.js +6 -9
- package/package.json +4 -4
package/es/index.js
CHANGED
|
@@ -172,15 +172,13 @@ var propTypes = {
|
|
|
172
172
|
onLogout: PropTypes.func,
|
|
173
173
|
checkOnMount: PropTypes.bool
|
|
174
174
|
};
|
|
175
|
-
var defaultProps = {
|
|
176
|
-
user: null,
|
|
177
|
-
onLogout: null,
|
|
178
|
-
checkOnMount: false
|
|
179
|
-
};
|
|
180
175
|
var AuthProvider = function AuthProvider(_ref) {
|
|
181
|
-
var
|
|
182
|
-
|
|
183
|
-
|
|
176
|
+
var _ref$user = _ref.user,
|
|
177
|
+
initialUser = _ref$user === void 0 ? null : _ref$user,
|
|
178
|
+
_ref$checkOnMount = _ref.checkOnMount,
|
|
179
|
+
checkOnMount = _ref$checkOnMount === void 0 ? false : _ref$checkOnMount,
|
|
180
|
+
_ref$onLogout = _ref.onLogout,
|
|
181
|
+
onLogout = _ref$onLogout === void 0 ? null : _ref$onLogout,
|
|
184
182
|
children = _ref.children;
|
|
185
183
|
// const route = useUrlGenerator();
|
|
186
184
|
var _useState = useState(initialUser),
|
|
@@ -253,6 +251,5 @@ var AuthProvider = function AuthProvider(_ref) {
|
|
|
253
251
|
}, children);
|
|
254
252
|
};
|
|
255
253
|
AuthProvider.propTypes = propTypes;
|
|
256
|
-
AuthProvider.defaultProps = defaultProps;
|
|
257
254
|
|
|
258
255
|
export { AuthProvider, useAuth, useAuthCheck, useAuthLogin, useAuthLogout, useAuthRegister, useAuthRequestPassword, useAuthResetPassword, useLoggedIn, useLogout, useSetUser, useUser };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/auth",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -57,12 +57,12 @@
|
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@babel/runtime": "^7.12.5",
|
|
60
|
-
"@panneau/core": "^
|
|
61
|
-
"@panneau/data": "^
|
|
60
|
+
"@panneau/core": "^4.0.0",
|
|
61
|
+
"@panneau/data": "^4.0.0",
|
|
62
62
|
"prop-types": "^15.7.2"
|
|
63
63
|
},
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "2cca874e0388b4a20c39aadb205c0e67d5a946fc"
|
|
68
68
|
}
|