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