|
|
@@ -119,25 +119,27 @@ const ItemsTree: FC<ItemsTreeProps> = (props: ItemsTreeProps) => {
|
|
|
};
|
|
|
|
|
|
const onDeletedHandler: OnDeletedFunction = (pathOrPathsToDelete, isRecursively, isCompletely) => {
|
|
|
- if (typeof pathOrPathsToDelete === 'string') {
|
|
|
- const path = pathOrPathsToDelete;
|
|
|
-
|
|
|
- if (isRecursively) {
|
|
|
- if (isCompletely) {
|
|
|
- toastSuccess(t('deleted_single_page_recursively_completely', { path }));
|
|
|
- }
|
|
|
- else {
|
|
|
- toastSuccess(t('deleted_single_page_recursively', { path }));
|
|
|
- }
|
|
|
+ if (typeof pathOrPathsToDelete !== 'string') {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ const path = pathOrPathsToDelete;
|
|
|
+
|
|
|
+ if (isRecursively) {
|
|
|
+ if (isCompletely) {
|
|
|
+ toastSuccess(t('deleted_single_page_recursively_completely', { path }));
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ toastSuccess(t('deleted_single_page_recursively', { path }));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ // eslint-disable-next-line no-lonely-if
|
|
|
+ if (isCompletely) {
|
|
|
+ toastSuccess(t('deleted_single_page_completely', { path }));
|
|
|
}
|
|
|
else {
|
|
|
- // eslint-disable-next-line no-lonely-if
|
|
|
- if (isCompletely) {
|
|
|
- toastSuccess(t('deleted_single_page_completely', { path }));
|
|
|
- }
|
|
|
- else {
|
|
|
- toastSuccess(t('deleted_single_page', { path }));
|
|
|
- }
|
|
|
+ toastSuccess(t('deleted_single_page', { path }));
|
|
|
}
|
|
|
}
|
|
|
};
|