Jelajahi Sumber

fix rename collection not updating ui

Abhinav 2 tahun lalu
induk
melakukan
a2916492c0
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      src/components/Collections/CollectionOptions/index.tsx

+ 2 - 2
src/components/Collections/CollectionOptions/index.tsx

@@ -119,9 +119,9 @@ const CollectionOptions = (props: CollectionOptionsProps) => {
         };
     };
 
-    const renameCollection = (newName: string) => {
+    const renameCollection = async (newName: string) => {
         if (activeCollection.name !== newName) {
-            CollectionAPI.renameCollection(activeCollection, newName);
+            await CollectionAPI.renameCollection(activeCollection, newName);
         }
     };