|
@@ -380,21 +380,14 @@ const Item: FC<ItemProps> = (props: ItemProps) => {
|
|
|
setRenaming(true);
|
|
setRenaming(true);
|
|
|
await resumeRenameOperation(pageId);
|
|
await resumeRenameOperation(pageId);
|
|
|
|
|
|
|
|
- mutateChildren();
|
|
|
|
|
-
|
|
|
|
|
if (onRenamed != null) {
|
|
if (onRenamed != null) {
|
|
|
onRenamed();
|
|
onRenamed();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
toastSuccess(t('page_operation.paths_recovered'));
|
|
toastSuccess(t('page_operation.paths_recovered'));
|
|
|
}
|
|
}
|
|
|
- catch (err) {
|
|
|
|
|
- toastError(t(err[0].message));
|
|
|
|
|
- }
|
|
|
|
|
- finally {
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- setRenaming(false);
|
|
|
|
|
- }, 1000);
|
|
|
|
|
|
|
+ catch (e) {
|
|
|
|
|
+ toastError(t('page_operation.path_recovery_failed'));
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|