prettier config

This commit is contained in:
Victor Batischev
2023-12-19 17:36:30 +03:00
parent a143e274f4
commit 5d03502e5c
69 changed files with 536 additions and 536 deletions

View File

@ -17,13 +17,13 @@ export const ModalResetPassword = ({ active, setActive }) => {
const [inputsValue, setInputsValue] = useState({
email: "",
token: "",
password: "",
password: ""
});
const [inputsError, setInputsError] = useState({
email: false,
password: false,
token: false,
token: false
});
const validateEmail = (email) => {
@ -40,7 +40,7 @@ export const ModalResetPassword = ({ active, setActive }) => {
setInputsValue({
email: "",
token: "",
password: "",
password: ""
});
};
@ -51,22 +51,22 @@ export const ModalResetPassword = ({ active, setActive }) => {
return showNotification({
show: true,
text: "Введите корректный e-mail",
type: "error",
type: "error"
});
}
setLoader(true);
apiRequest("/register/request-password-reset", {
method: "POST",
data: {
email: inputsValue.email,
},
email: inputsValue.email
}
}).then((data) => {
setLoader(false);
if (data) {
showNotification({
show: true,
text: "Письмо отправлено Вам на почту",
type: "success",
type: "success"
});
setStep(true);
}
@ -77,12 +77,12 @@ export const ModalResetPassword = ({ active, setActive }) => {
setInputsError((prevValue) => ({
...prevValue,
password: true,
token: true,
token: true
}));
return showNotification({
show: true,
text: "Введите данные",
type: "error",
type: "error"
});
}
if (inputsValue.password.length < 6) {
@ -94,15 +94,15 @@ export const ModalResetPassword = ({ active, setActive }) => {
method: "POST",
data: {
token: inputsValue.token,
password: inputsValue.password,
},
password: inputsValue.password
}
}).then((data) => {
setLoader(false);
if (data.code === 0) {
showNotification({
show: true,
text: "Введите корректные данные",
type: "error",
type: "error"
});
} else {
setActive(false);
@ -110,7 +110,7 @@ export const ModalResetPassword = ({ active, setActive }) => {
showNotification({
show: true,
text: "Пароль изменён",
type: "success",
type: "success"
});
}
});
@ -133,12 +133,12 @@ export const ModalResetPassword = ({ active, setActive }) => {
onChange={(e) => {
setInputsValue((prevValue) => ({
...prevValue,
email: e.target.value,
email: e.target.value
}));
setInputsError({
email: false,
password: false,
token: false,
token: false
});
}}
placeholder="E-mail"
@ -173,11 +173,11 @@ export const ModalResetPassword = ({ active, setActive }) => {
setInputsError({
email: false,
password: false,
token: false,
token: false
});
setInputsValue((prevValue) => ({
...prevValue,
token: e.target.value,
token: e.target.value
}));
}}
value={inputsValue.token}
@ -193,12 +193,12 @@ export const ModalResetPassword = ({ active, setActive }) => {
onChange={(e) => {
setInputsValue((prevValue) => ({
...prevValue,
password: e.target.value,
password: e.target.value
}));
setInputsError({
email: false,
password: false,
token: false,
token: false
});
}}
placeholder="password"