fix: followup pr - only close folder tab on rename

This commit is contained in:
lohxt1 2024-12-15 19:55:15 +05:30
parent 83bbbe3fb3
commit c154dec2b5

View File

@ -34,7 +34,7 @@ const RenameCollectionItem = ({ collection, item, onClose }) => {
}
dispatch(renameItem(values.name, item.uid, collection.uid))
.then(() => {
dispatch(closeTabs({ tabUids: [item.uid] }));
isFolder && dispatch(closeTabs({ tabUids: [item.uid] }));
toast.success(isFolder ? 'Folder renamed' : 'Request renamed');
onClose();
})