aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/projects/components
diff options
context:
space:
mode:
authorMathieu Suen <mathieu.suen@sonarsource.com>2022-06-21 09:24:30 +0200
committersonartech <sonartech@sonarsource.com>2022-07-20 20:03:25 +0000
commit0a7d6f7245e753feb25bceae733fd659591b8f81 (patch)
tree1f40d8439a8d7543dd0828a884868aada5a1810f /server/sonar-web/src/main/js/apps/projects/components
parent466c012d87ca3f37ead691160afb87b212d01645 (diff)
downloadsonarqube-0a7d6f7245e753feb25bceae733fd659591b8f81.tar.gz
sonarqube-0a7d6f7245e753feb25bceae733fd659591b8f81.zip
SONAR-16475 Remove lazyLoading of frontend component
Diffstat (limited to 'server/sonar-web/src/main/js/apps/projects/components')
-rw-r--r--server/sonar-web/src/main/js/apps/projects/components/AllProjectsContainer.tsx22
-rw-r--r--server/sonar-web/src/main/js/apps/projects/components/DefaultPageSelector.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/projects/components/FavoriteProjectsContainer.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/projects/components/__tests__/DefaultPageSelector-test.tsx4
4 files changed, 6 insertions, 28 deletions
diff --git a/server/sonar-web/src/main/js/apps/projects/components/AllProjectsContainer.tsx b/server/sonar-web/src/main/js/apps/projects/components/AllProjectsContainer.tsx
deleted file mode 100644
index 01d581d97a7..00000000000
--- a/server/sonar-web/src/main/js/apps/projects/components/AllProjectsContainer.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2022 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-import { lazyLoadComponent } from '../../../components/lazyLoadComponent';
-
-export default lazyLoadComponent(() => import('./AllProjects'));
diff --git a/server/sonar-web/src/main/js/apps/projects/components/DefaultPageSelector.tsx b/server/sonar-web/src/main/js/apps/projects/components/DefaultPageSelector.tsx
index fa938e1a828..97ed1257bff 100644
--- a/server/sonar-web/src/main/js/apps/projects/components/DefaultPageSelector.tsx
+++ b/server/sonar-web/src/main/js/apps/projects/components/DefaultPageSelector.tsx
@@ -26,7 +26,7 @@ import { get } from '../../../helpers/storage';
import { hasGlobalPermission } from '../../../helpers/users';
import { CurrentUser, isLoggedIn } from '../../../types/users';
import { PROJECTS_ALL, PROJECTS_DEFAULT_FILTER, PROJECTS_FAVORITE } from '../utils';
-import AllProjectsContainer from './AllProjectsContainer';
+import AllProjects from './AllProjects';
export interface DefaultPageSelectorProps {
currentUser: CurrentUser;
@@ -95,7 +95,7 @@ export function DefaultPageSelector(props: DefaultPageSelectorProps) {
return null;
}
- return <AllProjectsContainer isFavorite={false} />;
+ return <AllProjects isFavorite={false} />;
}
export default withCurrentUserContext(DefaultPageSelector);
diff --git a/server/sonar-web/src/main/js/apps/projects/components/FavoriteProjectsContainer.tsx b/server/sonar-web/src/main/js/apps/projects/components/FavoriteProjectsContainer.tsx
index 8d5bbad6d56..aad6fbcec4e 100644
--- a/server/sonar-web/src/main/js/apps/projects/components/FavoriteProjectsContainer.tsx
+++ b/server/sonar-web/src/main/js/apps/projects/components/FavoriteProjectsContainer.tsx
@@ -18,8 +18,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import AllProjectsContainer from './AllProjectsContainer';
+import AllProjects from './AllProjects';
export default function FavoriteProjectsContainer(props: any) {
- return <AllProjectsContainer isFavorite={true} {...props} />;
+ return <AllProjects isFavorite={true} {...props} />;
}
diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/DefaultPageSelector-test.tsx b/server/sonar-web/src/main/js/apps/projects/components/__tests__/DefaultPageSelector-test.tsx
index 2c35ecc0571..8f1a8f5533d 100644
--- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/DefaultPageSelector-test.tsx
+++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/DefaultPageSelector-test.tsx
@@ -29,10 +29,10 @@ import { CurrentUser } from '../../../../types/users';
import { DefaultPageSelector } from '../DefaultPageSelector';
jest.mock(
- '../AllProjectsContainer',
+ '../AllProjects',
() =>
// eslint-disable-next-line
- function AllProjectsContainer() {
+ function AllProjects() {
return <div>All Projects</div>;
}
);