fix auth errors and add tracker-registration
This commit is contained in:
@ -32,10 +32,10 @@ export const ModalRegistration = ({ active, setActive }) => {
|
||||
const apiEndpoint = "/register/sign-up";
|
||||
|
||||
const { showNotification } = useNotification();
|
||||
const showNotificationError = () => {
|
||||
const showNotificationError = (error) => {
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Аккаунт с таким логином или email уже существует",
|
||||
text: error,
|
||||
type: "error"
|
||||
});
|
||||
};
|
||||
@ -58,7 +58,9 @@ export const ModalRegistration = ({ active, setActive }) => {
|
||||
fields,
|
||||
showNotificationError,
|
||||
showNotificationTrue,
|
||||
isPartner
|
||||
isPartner,
|
||||
setLoader,
|
||||
closeModal
|
||||
);
|
||||
|
||||
return (
|
||||
@ -142,12 +144,7 @@ export const ModalRegistration = ({ active, setActive }) => {
|
||||
<BaseButton
|
||||
onClick={async (e) => {
|
||||
e.preventDefault();
|
||||
setLoader(true);
|
||||
const result = await handleSubmit(e);
|
||||
if (result === true) {
|
||||
closeModal();
|
||||
}
|
||||
setLoader(false);
|
||||
await handleSubmit(e);
|
||||
}}
|
||||
styles="button-box__submit"
|
||||
>
|
||||
|
Reference in New Issue
Block a user