aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/marketplace
diff options
context:
space:
mode:
authorJeremy Davis <jeremy.davis@sonarsource.com>2020-03-02 16:00:29 +0100
committersonartech <sonartech@sonarsource.com>2020-03-06 20:04:32 +0000
commit85c94cb261a16c3126ee856325bc038afd1ef405 (patch)
tree7716fe451c0078cbfee0c0dc1b3abe1b4bf3a9de /server/sonar-web/src/main/js/apps/marketplace
parenta91ea17d6efbbd6bd8e17a98c248000d0dd70c17 (diff)
downloadsonarqube-85c94cb261a16c3126ee856325bc038afd1ef405.tar.gz
sonarqube-85c94cb261a16c3126ee856325bc038afd1ef405.zip
SONAR-13147 lazyloading
Diffstat (limited to 'server/sonar-web/src/main/js/apps/marketplace')
-rw-r--r--server/sonar-web/src/main/js/apps/marketplace/components/EditionBox.tsx7
-rw-r--r--server/sonar-web/src/main/js/apps/marketplace/components/__tests__/__snapshots__/EditionBox-test.tsx.snap2
-rw-r--r--server/sonar-web/src/main/js/apps/marketplace/routes.ts4
3 files changed, 8 insertions, 5 deletions
diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/EditionBox.tsx b/server/sonar-web/src/main/js/apps/marketplace/components/EditionBox.tsx
index 1ee19543cd6..dc80a1870f4 100644
--- a/server/sonar-web/src/main/js/apps/marketplace/components/EditionBox.tsx
+++ b/server/sonar-web/src/main/js/apps/marketplace/components/EditionBox.tsx
@@ -21,12 +21,15 @@ import tooltipDCE from 'Docs/tooltips/editions/datacenter.md';
import tooltipDE from 'Docs/tooltips/editions/developer.md';
import tooltipEE from 'Docs/tooltips/editions/enterprise.md';
import * as React from 'react';
-import { lazyLoad } from 'sonar-ui-common/components/lazyLoad';
+import { lazyLoadComponent } from 'sonar-ui-common/components/lazyLoadComponent';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { getEditionUrl } from '../../../helpers/editions';
import { Edition, EditionKey } from '../../../types/editions';
-const DocMarkdownBlock = lazyLoad(() => import('../../../components/docs/DocMarkdownBlock'));
+const DocMarkdownBlock = lazyLoadComponent(
+ () => import('../../../components/docs/DocMarkdownBlock'),
+ 'DocMarkdownBlock'
+);
interface Props {
currentEdition?: EditionKey;
diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/__snapshots__/EditionBox-test.tsx.snap b/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/__snapshots__/EditionBox-test.tsx.snap
index cfd28f4bc35..538a9f2b9ef 100644
--- a/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/__snapshots__/EditionBox-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/__snapshots__/EditionBox-test.tsx.snap
@@ -4,7 +4,7 @@ exports[`should display the edition 1`] = `
<div
className="boxed-group boxed-group-inner marketplace-edition"
>
- <LazyLoader />
+ <DocMarkdownBlock />
<div
className="marketplace-edition-action spacer-top"
>
diff --git a/server/sonar-web/src/main/js/apps/marketplace/routes.ts b/server/sonar-web/src/main/js/apps/marketplace/routes.ts
index 68418a8f274..729a854fd60 100644
--- a/server/sonar-web/src/main/js/apps/marketplace/routes.ts
+++ b/server/sonar-web/src/main/js/apps/marketplace/routes.ts
@@ -17,11 +17,11 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { lazyLoad } from 'sonar-ui-common/components/lazyLoad';
+import { lazyLoadComponent } from 'sonar-ui-common/components/lazyLoadComponent';
const routes = [
{
- indexRoute: { component: lazyLoad(() => import('./AppContainer')) }
+ indexRoute: { component: lazyLoadComponent(() => import('./AppContainer')) }
}
];