react-redux-django-auth 1.3.3 → 1.3.4
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/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -1
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1111,6 +1111,9 @@ var useLogin = function(initialFields, apiUrl) {
|
|
|
1111
1111
|
var status = (0, import_react_redux2.useSelector)(function(state) {
|
|
1112
1112
|
return state.auth.status;
|
|
1113
1113
|
});
|
|
1114
|
+
var currentUser = (0, import_react_redux2.useSelector)(function(state) {
|
|
1115
|
+
return state.auth.user;
|
|
1116
|
+
});
|
|
1114
1117
|
var isStatus200 = status === 200;
|
|
1115
1118
|
(0, import_react2.useEffect)(function() {
|
|
1116
1119
|
return function() {
|
|
@@ -1182,7 +1185,8 @@ var useLogin = function(initialFields, apiUrl) {
|
|
|
1182
1185
|
onChange: handleChange,
|
|
1183
1186
|
onSubmit: handleSubmit,
|
|
1184
1187
|
isAuthenticated: isAuthenticated,
|
|
1185
|
-
isStatus200: isStatus200
|
|
1188
|
+
isStatus200: isStatus200,
|
|
1189
|
+
currentUser: currentUser
|
|
1186
1190
|
};
|
|
1187
1191
|
};
|
|
1188
1192
|
var useLogin_default = useLogin;
|
package/dist/index.mjs
CHANGED
|
@@ -358,6 +358,7 @@ var useLogin = (initialFields, apiUrl) => {
|
|
|
358
358
|
);
|
|
359
359
|
const error = useSelector2((state) => state.auth.error);
|
|
360
360
|
const status = useSelector2((state) => state.auth.status);
|
|
361
|
+
const currentUser = useSelector2((state) => state.auth.user);
|
|
361
362
|
const isStatus200 = status === 200;
|
|
362
363
|
useEffect2(() => {
|
|
363
364
|
return () => {
|
|
@@ -389,7 +390,8 @@ var useLogin = (initialFields, apiUrl) => {
|
|
|
389
390
|
onChange: handleChange,
|
|
390
391
|
onSubmit: handleSubmit,
|
|
391
392
|
isAuthenticated,
|
|
392
|
-
isStatus200
|
|
393
|
+
isStatus200,
|
|
394
|
+
currentUser
|
|
393
395
|
};
|
|
394
396
|
};
|
|
395
397
|
var useLogin_default = useLogin;
|