-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: change post/patch folders requests to use UseQuery #2917
Conversation
…lders in the sidebar 📝 (folders): Add use-post-folders and use-patch-folders hooks for handling post and patch requests for folders 🔧 (BundleModal): Remove useFolderSubmit hook and directly use usePostFolders hook for adding and updating folders in the modal
…ng of the component 📝 (folders/index.tsx): Export use-delete-folders from the folders index file 📝 (use-delete-folders.ts): Create useDeleteFolders hook to handle deletion of folders 🔧 (use-delete-folder.tsx): Remove unused useDeleteFolder hook 📝 (mainPage/index.tsx): Replace useDeleteFolder hook with useDeleteFolders hook to handle folder deletion
…ders in the sidebar component 🔧 (use-patch-folders): Refactor IPatchAddFolders interface to IPatchPatchFolders for better naming consistency 🔧 (use-patch-folders): Refactor addFoldersFn to patchFoldersFn for better function naming 🔧 (use-patch-folders): Update patchFoldersFn to send patch request to specific folder endpoint 🔧 (use-patch-folders): Update patchFoldersFn to handle updating folders and return updated data 🔧 (use-patch-folders): Update usePatchFolders hook to use patchFoldersFn for mutation 🔧 (use-post-folders): Remove unnecessary call to getFoldersApi after posting folders 🔧 (BundleModal): Remove BundleModal component and entities as they are no longer needed 🔧 (BundleModal/index.tsx): Remove unused imports and clean up code 🔧 (foldersModal/component/index.tsx): Remove unused imports and clean up code 🔧 (foldersModal/entities/index.ts): Remove unused zod schema and clean up code 🔧 (foldersModal/hooks/submit-folder.tsx): Remove unused imports and clean up code ✨ (foldersModal/index.tsx): Remove unused FoldersModal component from modalsComponent to optimize code and improve maintainability.
…rops from ModalsComponent ♻️ (services/index.ts): Remove addFolder, updateFolder, and deleteFolder functions as they are not used in the application ♻️ (foldersStore.tsx): Remove unused import statements for uploadFlowsFromFolders from services and related functions
Pull Request Validation ReportThis comment is automatically generated by Conventional PR Whitelist Report
Result Pull request does not satisfy any enabled whitelist criteria. Pull request will be validated. Validation Report
Result Pull request satisfies all enabled pull request rules. Last Modified at 24 Jul 24 13:57 UTC |
This pull request is automatically being deployed by Amplify Hosting (learn more). |
…refresh folders after successful operation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…w-ai#2917) * ✨ (sidebarComponent): Add usePostFolders hook to handle adding new folders in the sidebar 📝 (folders): Add use-post-folders and use-patch-folders hooks for handling post and patch requests for folders 🔧 (BundleModal): Remove useFolderSubmit hook and directly use usePostFolders hook for adding and updating folders in the modal * ✨ (sidebarComponent): Add usePatchFolders hook to handle updating folders in the sidebar component 🔧 (use-patch-folders): Refactor IPatchAddFolders interface to IPatchPatchFolders for better naming consistency 🔧 (use-patch-folders): Refactor addFoldersFn to patchFoldersFn for better function naming 🔧 (use-patch-folders): Update patchFoldersFn to send patch request to specific folder endpoint 🔧 (use-patch-folders): Update patchFoldersFn to handle updating folders and return updated data 🔧 (use-patch-folders): Update usePatchFolders hook to use patchFoldersFn for mutation 🔧 (use-post-folders): Remove unnecessary call to getFoldersApi after posting folders 🔧 (BundleModal): Remove BundleModal component and entities as they are no longer needed 🔧 (BundleModal/index.tsx): Remove unused imports and clean up code 🔧 (foldersModal/component/index.tsx): Remove unused imports and clean up code 🔧 (foldersModal/entities/index.ts): Remove unused zod schema and clean up code 🔧 (foldersModal/hooks/submit-folder.tsx): Remove unused imports and clean up code ✨ (foldersModal/index.tsx): Remove unused FoldersModal component from modalsComponent to optimize code and improve maintainability. * 📝 (index.tsx): Remove unused openFolderModal and setOpenFolderModal props from ModalsComponent ♻️ (services/index.ts): Remove addFolder, updateFolder, and deleteFolder functions as they are not used in the application ♻️ (foldersStore.tsx): Remove unused import statements for uploadFlowsFromFolders from services and related functions * 📝 (index.tsx): replace async/await with synchronous function call to refresh folders after successful operation (cherry picked from commit 6c5b487)
This pull request will change post/patch Folder's requests to use useQuery.