diff --git a/app/components/FilesEditor/index.tsx b/app/components/FilesEditor/index.tsx index 1f9d8a5..2c40ad9 100644 --- a/app/components/FilesEditor/index.tsx +++ b/app/components/FilesEditor/index.tsx @@ -77,7 +77,9 @@ const Index = () => { const handleRenameFile = useCallback( (file: FileProps, newName: string) => { if (ptero) { - ptero.files.rename(file, newName); + ptero.files.rename(file, newName).then(() => { + ptero.files.fetchFiles().then(setFileList); // Pobierz zaktualizowaną listę plików po zmianie nazwy + }); } setRenamePopup(initialRenamePopupState); }, @@ -143,7 +145,7 @@ const Index = () => {