diff --git a/src/containers/apps/Apps.tsx b/src/containers/apps/Apps.tsx index 24fcd88d..5ec9ca29 100644 --- a/src/containers/apps/Apps.tsx +++ b/src/containers/apps/Apps.tsx @@ -8,7 +8,6 @@ import ErrorRetry from '../global/ErrorRetry' import { IAppDef } from './AppDefinition' import AppsTable from './AppsTable' import CreateNewApp from './CreateNewApp' -import StorageHelper from '../../utils/StorageHelper' export default class Apps extends ApiComponent< RouteComponentProps, @@ -32,8 +31,7 @@ export default class Apps extends ApiComponent< this.state = { isLoading: true, apiData: undefined, - showCreateAppForm: - StorageHelper.getCreateAppFormVisibilityFromLocalStorage(), + showCreateAppForm: false } } @@ -156,9 +154,6 @@ export default class Apps extends ApiComponent< showCreateAppForm: !self.state.showCreateAppForm, }) - StorageHelper.setCreateAppFormVisibilityInLocalStorage( - !self.state.showCreateAppForm - ) }} /> diff --git a/src/utils/StorageHelper.ts b/src/utils/StorageHelper.ts index e5fd8074..4d810df2 100644 --- a/src/utils/StorageHelper.ts +++ b/src/utils/StorageHelper.ts @@ -14,7 +14,6 @@ const SIDER_COLLAPSED_STATE = 'CAPROVER_SIDER_COLLAPSED_STATE' const DARK_MODE = 'CAPROVER_DARK_MODE' const LANGUAGE = 'CAPROVER_LANGUAGE' const APP_PROJECT_SPLIT_RATIO = 'APP_PROJECT_SPLIT_RATIO' -const SHOW_CREATE_APP_FORM_VISIBLE = 'SHOW_CREATE_APP_FORM_VISIBLE' class StorageHelper { getAuthKeyFromStorage() { @@ -63,18 +62,6 @@ class StorageHelper { window.matchMedia('(prefers-color-scheme: dark)').matches } - setCreateAppFormVisibilityInLocalStorage(isVisible: boolean) { - localStorage.setItem( - SHOW_CREATE_APP_FORM_VISIBLE, - JSON.stringify(isVisible) - ) - } - - getCreateAppFormVisibilityFromLocalStorage(): boolean { - const isVisible = localStorage.getItem(SHOW_CREATE_APP_FORM_VISIBLE) - return isVisible ? JSON.parse(isVisible) : true - } - setLanguageInLocalStorage(language: string) { localStorage.setItem(LANGUAGE, language) }