From 3902d905f4527768bb5e1c6729fc2777f1dd12a0 Mon Sep 17 00:00:00 2001 From: Ayobami Akingbade Date: Thu, 11 Apr 2024 03:33:40 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(storage):=20remove=20credent?= =?UTF-8?q?ials=20UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/__tests__/_/forCodeCoverage.spec.ts | 4 +++- .../guest/_partials/GuestHeader/index.tsx | 4 ++-- .../components/EmptyWrapper/types.ts | 2 ++ .../integrations/storage/Credentials.tsx | 22 ++++--------------- 4 files changed, 11 insertions(+), 21 deletions(-) diff --git a/src/__tests__/_/forCodeCoverage.spec.ts b/src/__tests__/_/forCodeCoverage.spec.ts index cd6a6a36e..b295880bf 100644 --- a/src/__tests__/_/forCodeCoverage.spec.ts +++ b/src/__tests__/_/forCodeCoverage.spec.ts @@ -40,6 +40,7 @@ import { FOR_CODE_COV as $46 } from "shared/constants/portal/menu/main"; import { FOR_CODE_COV as $47 } from "shared/constants/portal/menu/index"; import { FOR_CODE_COV as $48 } from "shared/user-preferences/base-types"; import { FOR_CODE_COV as $49 } from "shared/user-preferences/types"; +import { FOR_CODE_COV as $50 } from "frontend/design-system/components/EmptyWrapper/types"; import { noop } from "shared/lib/noop"; @@ -85,7 +86,8 @@ noop( $46, $47, $48, - $49 + $49, + $50 ); describe("Code coverage ignores plain types file", () => { diff --git a/src/frontend/_layouts/guest/_partials/GuestHeader/index.tsx b/src/frontend/_layouts/guest/_partials/GuestHeader/index.tsx index 7eb0b39e6..98c8ccbe0 100644 --- a/src/frontend/_layouts/guest/_partials/GuestHeader/index.tsx +++ b/src/frontend/_layouts/guest/_partials/GuestHeader/index.tsx @@ -18,7 +18,7 @@ const Root = styled(CardBody)` interface IProps { title: string; - subTitle?: string; + subTitle: string; fullLogo?: string; homeLink?: string; } @@ -37,7 +37,7 @@ export function GuestHeader({ {title} - {subTitle ? {subTitle} : null} + {subTitle} ); diff --git a/src/frontend/design-system/components/EmptyWrapper/types.ts b/src/frontend/design-system/components/EmptyWrapper/types.ts index 10221a519..241165783 100644 --- a/src/frontend/design-system/components/EmptyWrapper/types.ts +++ b/src/frontend/design-system/components/EmptyWrapper/types.ts @@ -2,3 +2,5 @@ export interface IEmptyWrapperProps { text: string; createNew?: { action: string | (() => void); label: string }; } + +export const FOR_CODE_COV = 1; diff --git a/src/frontend/views/integrations/storage/Credentials.tsx b/src/frontend/views/integrations/storage/Credentials.tsx index 582f66cbc..cc1d83e21 100644 --- a/src/frontend/views/integrations/storage/Credentials.tsx +++ b/src/frontend/views/integrations/storage/Credentials.tsx @@ -7,7 +7,6 @@ import { FormSkeletonSchema, } from "frontend/design-system/components/Skeleton/Form"; import { ISchemaFormConfig } from "shared/form-schemas/types"; -import { noop } from "shared/lib/noop"; import { IStorageIntegration } from "shared/types/actions"; import { STORAGE_INTEGRATIONS_CRUD_CONFIG } from "./constants"; import { @@ -71,23 +70,10 @@ export function StorageCredentialsSettings() { } > {storageCredentialsConfiguration.data === undefined ? ( - <> - - fields={{ - storageKey: storageFormConfig, - }} - onSubmit={async () => noop()} - initialValues={{ - storageKey: currentStorage, - }} - buttonText={null} - systemIcon="Save" - /> - - + ) : ( fields={{