bug fixed
This commit is contained in:
parent
d3d2d5069e
commit
cfd33e9bd1
|
@ -46,6 +46,7 @@ export default function BulkEditLinksModal({ onClose }: Props) {
|
|||
},
|
||||
{
|
||||
onSettled: (data, error) => {
|
||||
setSubmitLoader(false);
|
||||
toast.dismiss(load);
|
||||
|
||||
if (error) {
|
||||
|
@ -58,8 +59,6 @@ export default function BulkEditLinksModal({ onClose }: Props) {
|
|||
},
|
||||
}
|
||||
);
|
||||
|
||||
setSubmitLoader(false);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ export default function DeleteCollectionModal({
|
|||
|
||||
deleteCollection.mutateAsync(collection.id as number, {
|
||||
onSettled: (data, error) => {
|
||||
setSubmitLoader(false);
|
||||
toast.dismiss(load);
|
||||
|
||||
if (error) {
|
||||
|
@ -55,8 +56,6 @@ export default function DeleteCollectionModal({
|
|||
}
|
||||
},
|
||||
});
|
||||
|
||||
setSubmitLoader(false);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -23,9 +23,10 @@ export default function DeleteUserModal({ onClose, userId }: Props) {
|
|||
onSuccess: () => {
|
||||
onClose();
|
||||
},
|
||||
});
|
||||
|
||||
onSettled: (data, error) => {
|
||||
setSubmitLoader(false);
|
||||
},
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ export default function EditCollectionModal({
|
|||
|
||||
await updateCollection.mutateAsync(collection, {
|
||||
onSettled: (data, error) => {
|
||||
setSubmitLoader(false);
|
||||
toast.dismiss(load);
|
||||
|
||||
if (error) {
|
||||
|
@ -45,8 +46,6 @@ export default function EditCollectionModal({
|
|||
}
|
||||
},
|
||||
});
|
||||
|
||||
setSubmitLoader(false);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ export default function EditCollectionSharingModal({
|
|||
|
||||
await updateCollection.mutateAsync(collection, {
|
||||
onSettled: (data, error) => {
|
||||
setSubmitLoader(false);
|
||||
toast.dismiss(load);
|
||||
|
||||
if (error) {
|
||||
|
@ -55,8 +56,6 @@ export default function EditCollectionSharingModal({
|
|||
}
|
||||
},
|
||||
});
|
||||
|
||||
setSubmitLoader(false);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ export default function InviteModal({ onClose }: Props) {
|
|||
|
||||
await addUser.mutateAsync(form, {
|
||||
onSettled: () => {
|
||||
setSubmitLoader(false);
|
||||
signIn("invite", {
|
||||
email: form.email,
|
||||
callbackUrl: "/member-onboarding",
|
||||
|
@ -58,8 +59,6 @@ export default function InviteModal({ onClose }: Props) {
|
|||
onClose();
|
||||
},
|
||||
});
|
||||
|
||||
setSubmitLoader(false);
|
||||
} else {
|
||||
toast.error(t("fill_all_fields_error"));
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@ export default function NewCollectionModal({ onClose, parent }: Props) {
|
|||
|
||||
await createCollection.mutateAsync(collection, {
|
||||
onSettled: (data, error) => {
|
||||
setSubmitLoader(false);
|
||||
toast.dismiss(load);
|
||||
|
||||
if (error) {
|
||||
|
@ -53,8 +54,6 @@ export default function NewCollectionModal({ onClose, parent }: Props) {
|
|||
}
|
||||
},
|
||||
});
|
||||
|
||||
setSubmitLoader(false);
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
|
@ -80,6 +80,7 @@ export default function NewLinkModal({ onClose }: Props) {
|
|||
|
||||
await addLink.mutateAsync(link, {
|
||||
onSettled: (data, error) => {
|
||||
setSubmitLoader(false);
|
||||
toast.dismiss(load);
|
||||
|
||||
if (error) {
|
||||
|
@ -90,8 +91,6 @@ export default function NewLinkModal({ onClose }: Props) {
|
|||
}
|
||||
},
|
||||
});
|
||||
|
||||
setSubmitLoader(false);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ export default function NewTokenModal({ onClose }: Props) {
|
|||
|
||||
await addToken.mutateAsync(token, {
|
||||
onSettled: (data, error) => {
|
||||
setSubmitLoader(false);
|
||||
toast.dismiss(load);
|
||||
|
||||
if (error) {
|
||||
|
@ -43,8 +44,6 @@ export default function NewTokenModal({ onClose }: Props) {
|
|||
}
|
||||
},
|
||||
});
|
||||
|
||||
setSubmitLoader(false);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -55,9 +55,10 @@ export default function NewUserModal({ onClose }: Props) {
|
|||
onSuccess: () => {
|
||||
onClose();
|
||||
},
|
||||
});
|
||||
|
||||
onSettled: () => {
|
||||
setSubmitLoader(false);
|
||||
},
|
||||
});
|
||||
} else {
|
||||
toast.error(t("fill_all_fields_error"));
|
||||
}
|
||||
|
|
|
@ -115,6 +115,7 @@ export default function UploadFileModal({ onClose }: Props) {
|
|||
{ link, file },
|
||||
{
|
||||
onSettled: (data, error) => {
|
||||
setSubmitLoader(false);
|
||||
toast.dismiss(load);
|
||||
|
||||
if (error) {
|
||||
|
@ -126,8 +127,6 @@ export default function UploadFileModal({ onClose }: Props) {
|
|||
},
|
||||
}
|
||||
);
|
||||
|
||||
setSubmitLoader(false);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@ export default function MemberOnboarding() {
|
|||
router.push("/dashboard");
|
||||
},
|
||||
onSettled: (data, error) => {
|
||||
setSubmitLoader(false);
|
||||
toast.dismiss(load);
|
||||
|
||||
if (error) {
|
||||
|
@ -63,8 +64,6 @@ export default function MemberOnboarding() {
|
|||
},
|
||||
}
|
||||
);
|
||||
|
||||
setSubmitLoader(false);
|
||||
} else {
|
||||
toast.error(t("please_fill_all_fields"));
|
||||
}
|
||||
|
|
|
@ -108,6 +108,7 @@ export default function Account() {
|
|||
}
|
||||
},
|
||||
onSettled: (data, error) => {
|
||||
setSubmitLoader(false);
|
||||
toast.dismiss(load);
|
||||
|
||||
if (error) {
|
||||
|
@ -129,8 +130,6 @@ export default function Account() {
|
|||
location.reload();
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
setSubmitLoader(false);
|
||||
};
|
||||
|
||||
const importBookmarks = async (
|
||||
|
|
|
@ -34,6 +34,7 @@ export default function Password() {
|
|||
},
|
||||
{
|
||||
onSettled: (data, error) => {
|
||||
setSubmitLoader(false);
|
||||
toast.dismiss(load);
|
||||
|
||||
if (error) {
|
||||
|
@ -47,8 +48,6 @@ export default function Password() {
|
|||
},
|
||||
}
|
||||
);
|
||||
|
||||
setSubmitLoader(false);
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
|
@ -80,6 +80,7 @@ export default function Appearance() {
|
|||
{ ...user },
|
||||
{
|
||||
onSettled: (data, error) => {
|
||||
setSubmitLoader(false);
|
||||
toast.dismiss(load);
|
||||
|
||||
if (error) {
|
||||
|
@ -90,8 +91,6 @@ export default function Appearance() {
|
|||
},
|
||||
}
|
||||
);
|
||||
|
||||
setSubmitLoader(false);
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
|
@ -85,6 +85,7 @@ export default function Index() {
|
|||
},
|
||||
{
|
||||
onSettled: (data, error) => {
|
||||
setSubmitLoader(false);
|
||||
toast.dismiss(load);
|
||||
|
||||
if (error) {
|
||||
|
@ -97,7 +98,6 @@ export default function Index() {
|
|||
);
|
||||
}
|
||||
|
||||
setSubmitLoader(false);
|
||||
setRenameTag(false);
|
||||
};
|
||||
|
||||
|
|
Ŝarĝante…
Reference in New Issue