mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-07 22:18:33 +00:00
refactor: enhance OpenAPISyncTab functionality and clean up unused code (#7392)
- Updated OpenAPISyncTab to utilize Redux state for active tab management, improving state consistency. - Removed unnecessary loading state checks from OverviewSection and SpecStatusSection for cleaner logic. - Streamlined prop usage in OverviewSection by eliminating the isLoading prop. - Cleaned up useOpenAPISync hook by removing unused state clearing logic on unmount. - Improved file handling in openapi-sync IPC by ensuring new files are created in the appropriate folder based on tags.
This commit is contained in:
@@ -27,13 +27,6 @@ const useOpenAPISync = (collection) => {
|
||||
|
||||
const isConfigured = !!openApiSyncConfig?.sourceUrl;
|
||||
|
||||
// Clear Redux state when the sync tab is closed (unmount)
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
dispatch(clearCollectionState({ collectionUid: collection.uid }));
|
||||
};
|
||||
}, [collection.uid]);
|
||||
|
||||
// Flatten collection items including nested items in folders
|
||||
const allHttpItems = useMemo(() => {
|
||||
return flattenItems(collection?.items || []).filter((item) => item.type === 'http-request');
|
||||
|
||||
Reference in New Issue
Block a user