react-redux-django-auth 1.3.0 → 1.3.2

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 CHANGED
@@ -1007,10 +1007,10 @@ var useActivate = function(uid, token, apiUrl) {
1007
1007
  var _ref = _sliced_to_array((0, import_react.useState)(false), 2), loading = _ref[0], setLoading = _ref[1];
1008
1008
  var dispatch = (0, import_react_redux.useDispatch)();
1009
1009
  var error = (0, import_react_redux.useSelector)(function(state) {
1010
- return state.error;
1010
+ return state.auth.error;
1011
1011
  });
1012
1012
  var status = (0, import_react_redux.useSelector)(function(state) {
1013
- return state.status;
1013
+ return state.auth.status;
1014
1014
  });
1015
1015
  var isStatus204 = status === 204;
1016
1016
  (0, import_react.useEffect)(function() {
@@ -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() {
@@ -1192,13 +1192,13 @@ var useSignup = function(initialFields, apiUrl) {
1192
1192
  var _ref1 = _sliced_to_array((0, import_react4.useState)(initialFields), 2), formData = _ref1[0], setFormData = _ref1[1];
1193
1193
  var dispatch = (0, import_react_redux4.useDispatch)();
1194
1194
  var isAuthenticated = (0, import_react_redux4.useSelector)(function(state) {
1195
- return state.isAuthenticated;
1195
+ return state.auth.isAuthenticated;
1196
1196
  });
1197
1197
  var error = (0, import_react_redux4.useSelector)(function(state) {
1198
- return state.error;
1198
+ return state.auth.error;
1199
1199
  });
1200
1200
  var status = (0, import_react_redux4.useSelector)(function(state) {
1201
- return state.status;
1201
+ return state.auth.status;
1202
1202
  });
1203
1203
  var isStatus201 = status === 201;
1204
1204
  (0, import_react4.useEffect)(function() {
package/dist/index.mjs CHANGED
@@ -314,8 +314,8 @@ var changeLoggedInUserPassword = (formData, apiUrl) => async (dispatch) => {
314
314
  var useActivate = (uid, token, apiUrl) => {
315
315
  const [loading, setLoading] = useState(false);
316
316
  const dispatch = useDispatch();
317
- const error = useSelector((state) => state.error);
318
- const status = useSelector((state) => state.status);
317
+ const error = useSelector((state) => state.auth.error);
318
+ const status = useSelector((state) => state.auth.status);
319
319
  const isStatus204 = status === 204;
320
320
  useEffect(() => {
321
321
  return () => {
@@ -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 () => {
@@ -414,10 +414,10 @@ var useSignup = (initialFields, apiUrl) => {
414
414
  const [formData, setFormData] = useState3(initialFields);
415
415
  const dispatch = useDispatch4();
416
416
  const isAuthenticated = useSelector3(
417
- (state) => state.isAuthenticated
417
+ (state) => state.auth.isAuthenticated
418
418
  );
419
- const error = useSelector3((state) => state.error);
420
- const status = useSelector3((state) => state.status);
419
+ const error = useSelector3((state) => state.auth.error);
420
+ const status = useSelector3((state) => state.auth.status);
421
421
  const isStatus201 = status === 201;
422
422
  useEffect3(() => {
423
423
  return () => {
@@ -464,9 +464,7 @@ var useAuthicatedUser = (apiURL, location) => {
464
464
  (state) => state.auth.isAuthenticated
465
465
  );
466
466
  const error = useSelector4((state) => state.auth.error);
467
- const currentUser = useSelector4(
468
- (state) => state.auth.user
469
- );
467
+ const currentUser = useSelector4((state) => state.auth.user);
470
468
  useEffect4(() => {
471
469
  dispatch(checkAuthenticated(apiURL));
472
470
  }, [dispatch, apiURL, location]);
@@ -593,9 +591,7 @@ var useChangeAuthenticatedUserPassword = (initialFields, apiUrl) => {
593
591
  const [loading, setLoading] = useState6(false);
594
592
  const [formData, setFormData] = useState6(initialFields);
595
593
  const [error, setError] = useState6(null);
596
- const authError = useSelector7(
597
- (state) => state.auth.error
598
- );
594
+ const authError = useSelector7((state) => state.auth.error);
599
595
  const status = useSelector7((state) => state.auth.status);
600
596
  useEffect7(() => {
601
597
  return () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-redux-django-auth",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "A React Redux Authentication system for django app built with TypeScript.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",