mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-09 00:18:00 +01:00
refactor: remove lazy loading for metrics page (#733)
This commit is contained in:
parent
33b5e4abac
commit
49c25cbaa6
@ -1,5 +1,5 @@
|
||||
import { Tab, Tabs, useMediaQuery } from '@material-ui/core';
|
||||
import React, { Suspense, useState } from 'react';
|
||||
import React, { useState } from 'react';
|
||||
import { Archive, FileCopy, Label, WatchLater } from '@material-ui/icons';
|
||||
import { Link, Route, useHistory, useParams } from 'react-router-dom';
|
||||
import useFeatureApi from '../../../hooks/api/actions/useFeatureApi/useFeatureApi';
|
||||
@ -19,6 +19,7 @@ import FeatureLog from './FeatureLog/FeatureLog';
|
||||
import FeatureOverview from './FeatureOverview/FeatureOverview';
|
||||
import FeatureStrategies from './FeatureStrategies/FeatureStrategies';
|
||||
import FeatureVariants from './FeatureVariants/FeatureVariants';
|
||||
import { FeatureMetrics } from './FeatureMetrics/FeatureMetrics';
|
||||
import { useStyles } from './FeatureView.styles';
|
||||
import FeatureSettings from './FeatureSettings/FeatureSettings';
|
||||
import useLoading from '../../../hooks/useLoading';
|
||||
@ -203,33 +204,31 @@ const FeatureView = () => {
|
||||
</Tabs>
|
||||
</div>
|
||||
</div>
|
||||
<Suspense fallback={null}>
|
||||
<Route
|
||||
exact
|
||||
path={`/projects/:projectId/features/:featureId`}
|
||||
component={FeatureOverview}
|
||||
/>
|
||||
<Route
|
||||
path={`/projects/:projectId/features/:featureId/strategies`}
|
||||
component={FeatureStrategies}
|
||||
/>
|
||||
<Route
|
||||
path={`/projects/:projectId/features/:featureId/metrics`}
|
||||
component={FeatureMetricsLazy}
|
||||
/>
|
||||
<Route
|
||||
path={`/projects/:projectId/features/:featureId/logs`}
|
||||
component={FeatureLog}
|
||||
/>
|
||||
<Route
|
||||
path={`/projects/:projectId/features/:featureId/variants`}
|
||||
component={FeatureVariants}
|
||||
/>
|
||||
<Route
|
||||
path={`/projects/:projectId/features/:featureId/settings`}
|
||||
component={FeatureSettings}
|
||||
/>
|
||||
</Suspense>
|
||||
<Route
|
||||
exact
|
||||
path={`/projects/:projectId/features/:featureId`}
|
||||
component={FeatureOverview}
|
||||
/>
|
||||
<Route
|
||||
path={`/projects/:projectId/features/:featureId/strategies`}
|
||||
component={FeatureStrategies}
|
||||
/>
|
||||
<Route
|
||||
path={`/projects/:projectId/features/:featureId/metrics`}
|
||||
component={FeatureMetrics}
|
||||
/>
|
||||
<Route
|
||||
path={`/projects/:projectId/features/:featureId/logs`}
|
||||
component={FeatureLog}
|
||||
/>
|
||||
<Route
|
||||
path={`/projects/:projectId/features/:featureId/variants`}
|
||||
component={FeatureVariants}
|
||||
/>
|
||||
<Route
|
||||
path={`/projects/:projectId/features/:featureId/settings`}
|
||||
component={FeatureSettings}
|
||||
/>
|
||||
<Dialogue
|
||||
onClick={() => archiveToggle()}
|
||||
open={showDelDialog}
|
||||
@ -256,8 +255,4 @@ const FeatureView = () => {
|
||||
);
|
||||
};
|
||||
|
||||
const FeatureMetricsLazy = React.lazy(
|
||||
() => import('./FeatureMetrics/FeatureMetrics')
|
||||
);
|
||||
|
||||
export default FeatureView;
|
||||
|
Loading…
Reference in New Issue
Block a user