react-redux-django-auth 1.3.0 → 1.3.1
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.js +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1088,13 +1088,13 @@ var useLogin = function(initialFields, apiUrl) {
|
|
|
1088
1088
|
var _ref1 = _sliced_to_array((0, import_react2.useState)(initialFields), 2), formData = _ref1[0], setFormData = _ref1[1];
|
|
1089
1089
|
var dispatch = (0, import_react_redux2.useDispatch)();
|
|
1090
1090
|
var isAuthenticated = (0, import_react_redux2.useSelector)(function(state) {
|
|
1091
|
-
return state.isAuthenticated;
|
|
1091
|
+
return state.auth.isAuthenticated;
|
|
1092
1092
|
});
|
|
1093
1093
|
var error = (0, import_react_redux2.useSelector)(function(state) {
|
|
1094
|
-
return state.error;
|
|
1094
|
+
return state.auth.error;
|
|
1095
1095
|
});
|
|
1096
1096
|
var status = (0, import_react_redux2.useSelector)(function(state) {
|
|
1097
|
-
return state.status;
|
|
1097
|
+
return state.auth.status;
|
|
1098
1098
|
});
|
|
1099
1099
|
var isStatus200 = status === 200;
|
|
1100
1100
|
(0, import_react2.useEffect)(function() {
|
package/dist/index.mjs
CHANGED
|
@@ -354,10 +354,10 @@ var useLogin = (initialFields, apiUrl) => {
|
|
|
354
354
|
const [formData, setFormData] = useState2(initialFields);
|
|
355
355
|
const dispatch = useDispatch2();
|
|
356
356
|
const isAuthenticated = useSelector2(
|
|
357
|
-
(state) => state.isAuthenticated
|
|
357
|
+
(state) => state.auth.isAuthenticated
|
|
358
358
|
);
|
|
359
|
-
const error = useSelector2((state) => state.error);
|
|
360
|
-
const status = useSelector2((state) => state.status);
|
|
359
|
+
const error = useSelector2((state) => state.auth.error);
|
|
360
|
+
const status = useSelector2((state) => state.auth.status);
|
|
361
361
|
const isStatus200 = status === 200;
|
|
362
362
|
useEffect2(() => {
|
|
363
363
|
return () => {
|