From 3b37a05131ca2a4cf23f6888824258c8e0a423be Mon Sep 17 00:00:00 2001 From: Mathieu Suen Date: Wed, 5 Jan 2022 09:30:53 +0100 Subject: [PATCH] Rename and cleanup IssuesApp --- .../src/main/js/apps/issues/__tests__/actions-test.ts | 2 +- server/sonar-web/src/main/js/apps/issues/actions.ts | 2 +- .../src/main/js/apps/issues/components/AppContainer.tsx | 2 +- .../js/apps/issues/components/{App.tsx => IssuesApp.tsx} | 5 ++--- .../main/js/apps/issues/components/__tests__/App-test.tsx | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) rename server/sonar-web/src/main/js/apps/issues/components/{App.tsx => IssuesApp.tsx} (99%) diff --git a/server/sonar-web/src/main/js/apps/issues/__tests__/actions-test.ts b/server/sonar-web/src/main/js/apps/issues/__tests__/actions-test.ts index 0d1d3c32168..50d93f07fc2 100644 --- a/server/sonar-web/src/main/js/apps/issues/__tests__/actions-test.ts +++ b/server/sonar-web/src/main/js/apps/issues/__tests__/actions-test.ts @@ -19,7 +19,7 @@ */ import { mockIssue } from '../../../helpers/testMocks'; import { enableLocationsNavigator, selectFlow, selectLocation } from '../actions'; -import { State } from '../components/App'; +import { State } from '../components/IssuesApp'; describe('selectFlow', () => { it('should select flow and enable locations navigator', () => { diff --git a/server/sonar-web/src/main/js/apps/issues/actions.ts b/server/sonar-web/src/main/js/apps/issues/actions.ts index 5458a267cc9..985fee258f1 100644 --- a/server/sonar-web/src/main/js/apps/issues/actions.ts +++ b/server/sonar-web/src/main/js/apps/issues/actions.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { State } from './components/App'; +import { State } from './components/IssuesApp'; export function enableLocationsNavigator(state: State) { const { openIssue, selectedLocationIndex } = state; diff --git a/server/sonar-web/src/main/js/apps/issues/components/AppContainer.tsx b/server/sonar-web/src/main/js/apps/issues/components/AppContainer.tsx index b6762016283..d0565a11fd2 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/AppContainer.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/AppContainer.tsx @@ -26,7 +26,7 @@ import { fetchBranchStatus } from '../../../store/rootActions'; import { getCurrentUser, Store } from '../../../store/rootReducer'; import { FetchIssuesPromise } from '../../../types/issues'; -const IssuesAppContainer = lazyLoadComponent(() => import('./App'), 'IssuesAppContainer'); +const IssuesAppContainer = lazyLoadComponent(() => import('./IssuesApp'), 'IssuesAppContainer'); const mapStateToProps = (state: Store) => ({ currentUser: getCurrentUser(state), diff --git a/server/sonar-web/src/main/js/apps/issues/components/App.tsx b/server/sonar-web/src/main/js/apps/issues/components/IssuesApp.tsx similarity index 99% rename from server/sonar-web/src/main/js/apps/issues/components/App.tsx rename to server/sonar-web/src/main/js/apps/issues/components/IssuesApp.tsx index 313a343de73..daf950c8c91 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/IssuesApp.tsx @@ -49,7 +49,6 @@ import { removeWhitePageClass } from '../../../helpers/pages'; import { serializeDate } from '../../../helpers/query'; -import { isSonarCloud } from '../../../helpers/system'; import { BranchLike } from '../../../types/branch-like'; import { Facet, @@ -86,7 +85,7 @@ import MyIssuesFilter from './MyIssuesFilter'; import NoIssues from './NoIssues'; import NoMyIssues from './NoMyIssues'; import PageActions from './PageActions'; - +] interface Props { branchLike?: BranchLike; component?: T.Component; @@ -886,7 +885,7 @@ export default class App extends React.PureComponent { return (
- {currentUser.isLoggedIn && !isSonarCloud() && ( + {currentUser.isLoggedIn && ( ({ -- 2.39.5