From 780128799a4e36fab2f5ed2532070920f27f17af Mon Sep 17 00:00:00 2001 From: SquirrelDevelopper Date: Fri, 29 Nov 2024 16:20:53 +0100 Subject: [PATCH] Remove unnecessary popover styling and extend error handling This commit removes redundant styling from popover components in ContainerStacksSettings and PlaybooksSettings. Additionally, it introduces new properties for enhanced error handling in the API types, adding `onError` and `onErrorMessage` fields to accommodate more robust error management. --- .../Admin/Settings/components/ContainerStacksSettings.tsx | 5 ----- .../pages/Admin/Settings/components/PlaybooksSettings.tsx | 5 ----- shared-lib/src/types/api.ts | 2 ++ 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/client/src/pages/Admin/Settings/components/ContainerStacksSettings.tsx b/client/src/pages/Admin/Settings/components/ContainerStacksSettings.tsx index 55b3851e..580a0a6c 100644 --- a/client/src/pages/Admin/Settings/components/ContainerStacksSettings.tsx +++ b/client/src/pages/Admin/Settings/components/ContainerStacksSettings.tsx @@ -130,11 +130,6 @@ const ContainerStacksSettings: React.FC = () => { if (row.onError) { return ( diff --git a/client/src/pages/Admin/Settings/components/PlaybooksSettings.tsx b/client/src/pages/Admin/Settings/components/PlaybooksSettings.tsx index 7ecc2aef..fdabb717 100644 --- a/client/src/pages/Admin/Settings/components/PlaybooksSettings.tsx +++ b/client/src/pages/Admin/Settings/components/PlaybooksSettings.tsx @@ -327,11 +327,6 @@ const PlaybookSettings: React.FC = () => { if (row.onError) { return ( diff --git a/shared-lib/src/types/api.ts b/shared-lib/src/types/api.ts index e2e0cf1d..be38bf0f 100644 --- a/shared-lib/src/types/api.ts +++ b/shared-lib/src/types/api.ts @@ -669,6 +669,8 @@ export type GitPlaybooksRepository = PlaybooksRepository & { default: boolean; gitService: Services; accessToken?: string; + onError?: boolean; + onErrorMessage?: string; } export type LocalPlaybooksRepository = PlaybooksRepository & {