1
1
import { pick } from 'lodash' ;
2
- import React , { FC , Suspense , useMemo } from 'react' ;
3
- import { lazily } from 'react-lazily' ;
2
+ import React , { FC , useMemo } from 'react' ;
4
3
import { connect , MapStateToProps } from 'react-redux' ;
5
4
6
5
import {
@@ -11,25 +10,23 @@ import {
11
10
FnPropsMappedFromState ,
12
11
} from 'app/core/reducers/fn-slice' ;
13
12
13
+ import { AngularRoot } from '../../angular/AngularRoot' ;
14
+ import { FnAppProvider } from '../fn-app-provider' ;
14
15
import { FNDashboardProps } from '../types' ;
15
16
import { RenderPortal } from '../utils' ;
16
17
17
- const { RenderFNDashboard } = lazily ( ( ) => import ( './render-fn-dashboard' ) ) ;
18
- const { FnAppProvider } = lazily ( ( ) => import ( '../fn-app-provider' ) ) ;
19
- const { AngularRoot } = lazily ( ( ) => import ( '../../angular/AngularRoot' ) ) ;
18
+ import { RenderFNDashboard } from './render-fn-dashboard' ;
20
19
21
20
type FNDashboardComponentProps = Omit < FNDashboardProps , FnPropMappedFromState > ;
22
21
23
22
export const FNDashboard : FC < FNDashboardComponentProps > = ( props ) => {
24
23
return (
25
- < Suspense fallback = { < > { props . fnLoader } </ > } >
26
- < FnAppProvider fnError = { props . fnError } >
27
- < div className = "page-dashboard" >
28
- < AngularRoot />
29
- < DashboardPortal { ...props } />
30
- </ div >
31
- </ FnAppProvider >
32
- </ Suspense >
24
+ < FnAppProvider fnError = { props . fnError } >
25
+ < div className = "page-dashboard" >
26
+ < AngularRoot />
27
+ < DashboardPortal { ...props } />
28
+ </ div >
29
+ </ FnAppProvider >
33
30
) ;
34
31
} ;
35
32
@@ -42,7 +39,6 @@ function mapStateToProps(): MapStateToProps<
42
39
}
43
40
44
41
export const DashboardPortalComponent : FC < FNDashboardComponentProps & FnPropsMappedFromState > = ( props ) => {
45
-
46
42
const content = useMemo ( ( ) => {
47
43
if ( ! props . FNDashboard ) {
48
44
// TODO Use no data
0 commit comments