react-redux-django-auth 1.3.4 → 1.3.5
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 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -76,7 +76,7 @@ declare const usePasswordConfirm: (initialFields: FormData$1, apiUrl: string) =>
|
|
|
76
76
|
interface FormData {
|
|
77
77
|
current_password?: string;
|
|
78
78
|
new_password?: string;
|
|
79
|
-
|
|
79
|
+
re_new_password?: string;
|
|
80
80
|
}
|
|
81
81
|
interface ChangePasswordHookReturn {
|
|
82
82
|
loading: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -76,7 +76,7 @@ declare const usePasswordConfirm: (initialFields: FormData$1, apiUrl: string) =>
|
|
|
76
76
|
interface FormData {
|
|
77
77
|
current_password?: string;
|
|
78
78
|
new_password?: string;
|
|
79
|
-
|
|
79
|
+
re_new_password?: string;
|
|
80
80
|
}
|
|
81
81
|
interface ChangePasswordHookReturn {
|
|
82
82
|
loading: boolean;
|
package/dist/index.js
CHANGED
|
@@ -1570,13 +1570,13 @@ var useChangeAuthenticatedUserPassword = function(initialFields, apiUrl) {
|
|
|
1570
1570
|
}, []);
|
|
1571
1571
|
var handleSubmit = (0, import_react8.useCallback)(function(e) {
|
|
1572
1572
|
return _async_to_generator(function() {
|
|
1573
|
-
var current_password, new_password,
|
|
1573
|
+
var current_password, new_password, re_new_password, err;
|
|
1574
1574
|
return _ts_generator(this, function(_state) {
|
|
1575
1575
|
switch(_state.label){
|
|
1576
1576
|
case 0:
|
|
1577
1577
|
e.preventDefault();
|
|
1578
|
-
current_password = formData.current_password, new_password = formData.new_password,
|
|
1579
|
-
if (new_password !==
|
|
1578
|
+
current_password = formData.current_password, new_password = formData.new_password, re_new_password = formData.re_new_password;
|
|
1579
|
+
if (new_password !== re_new_password) {
|
|
1580
1580
|
setError("New passwords do not match.");
|
|
1581
1581
|
return [
|
|
1582
1582
|
2
|
package/dist/index.mjs
CHANGED
|
@@ -607,8 +607,8 @@ var useChangeAuthenticatedUserPassword = (initialFields, apiUrl) => {
|
|
|
607
607
|
const handleSubmit = useCallback8(
|
|
608
608
|
async (e) => {
|
|
609
609
|
e.preventDefault();
|
|
610
|
-
const { current_password, new_password,
|
|
611
|
-
if (new_password !==
|
|
610
|
+
const { current_password, new_password, re_new_password } = formData;
|
|
611
|
+
if (new_password !== re_new_password) {
|
|
612
612
|
setError("New passwords do not match.");
|
|
613
613
|
return;
|
|
614
614
|
}
|