changes and improvements

This commit is contained in:
daniel31x13
2024-08-14 15:22:28 -04:00
parent d15d965139
commit 9cc3a7206e
24 changed files with 292 additions and 203 deletions
+12 -3
View File
@@ -36,6 +36,8 @@ export default function BulkEditLinksModal({ onClose }: Props) {
if (!submitLoader) {
setSubmitLoader(true);
const load = toast.loading(t("updating"));
await updateLinks.mutateAsync(
{
links: selectedLinks,
@@ -43,9 +45,16 @@ export default function BulkEditLinksModal({ onClose }: Props) {
removePreviousTags,
},
{
onSuccess: () => {
setSelectedLinks([]);
onClose();
onSettled: (data, error) => {
toast.dismiss(load);
if (error) {
toast.error(error.message);
} else {
setSelectedLinks([]);
onClose();
toast.success(t("updated"));
}
},
}
);