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:
Abhishek S Lal
2026-03-06 22:12:52 +05:30
committed by GitHub
parent af4c4b24e6
commit 553c45833c
5 changed files with 14 additions and 33 deletions

View File

@@ -32,9 +32,6 @@ const SpecStatusSection = ({
const lastSyncedAt = openApiSyncConfig?.lastSyncDate;
const bannerState = useMemo(() => {
if (isLoading) {
return { variant: 'muted', message: 'Checking for updates...', actions: [] };
}
if (fileNotFound) {
return { variant: 'danger', message: `Source file not found at ${sourceUrl}`, actions: ['open-settings'] };
}