aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/custom-metrics/routes.ts
diff options
context:
space:
mode:
authorStas Vilchik <stas.vilchik@sonarsource.com>2018-04-18 17:10:29 +0200
committerSonarTech <sonartech@sonarsource.com>2018-05-10 20:20:54 +0200
commitc8992030dd086ea86051462950bb5fd7f640ab48 (patch)
tree4a3aaa2210975fe04079fc4aa1c1b5e11e10249e /server/sonar-web/src/main/js/apps/custom-metrics/routes.ts
parenta271c79ff6c168b0d61a065997f3da3dd63d76d2 (diff)
downloadsonarqube-c8992030dd086ea86051462950bb5fd7f640ab48.tar.gz
sonarqube-c8992030dd086ea86051462950bb5fd7f640ab48.zip
SONAR-10601 refresh the page when the web app can not load a js bundle
Diffstat (limited to 'server/sonar-web/src/main/js/apps/custom-metrics/routes.ts')
-rw-r--r--server/sonar-web/src/main/js/apps/custom-metrics/routes.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/js/apps/custom-metrics/routes.ts b/server/sonar-web/src/main/js/apps/custom-metrics/routes.ts
index 9397beea9d1..75753a6139a 100644
--- a/server/sonar-web/src/main/js/apps/custom-metrics/routes.ts
+++ b/server/sonar-web/src/main/js/apps/custom-metrics/routes.ts
@@ -17,13 +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 { RouterState, IndexRouteProps } from 'react-router';
+import { lazyLoad } from '../../components/lazyLoad';
const routes = [
{
- getIndexRoute(_: RouterState, callback: (err: any, route: IndexRouteProps) => any) {
- import('./components/App').then(i => callback(null, { component: i.default }));
- }
+ indexRoute: { component: lazyLoad(() => import('./components/App')) }
}
];