@@ -11,13 +11,15 @@ import { Grid } from '@mui/material';
11
11
import {
12
12
AnnouncementNotification ,
13
13
CardErrorBoundary ,
14
+ fetchConfigParameter ,
15
+ fetchConfigParameters ,
14
16
NotificationsUrlKeys ,
15
17
useNotificationsListener ,
16
18
useSnackMessage ,
17
19
} from '@gridsuite/commons-ui' ;
18
20
import { selectComputedLanguage , selectLanguage , selectTheme } from '../../redux/actions' ;
19
21
import { AppState } from '../../redux/reducer' ;
20
- import { ConfigParameters , ConfigSrv } from '../../services' ;
22
+ import { ConfigParameters } from '../../services' ;
21
23
import { APP_NAME , COMMON_APP_NAME , PARAM_LANGUAGE , PARAM_THEME } from '../../utils/config-params' ;
22
24
import { getComputedLanguage } from '../../utils/language' ;
23
25
import AppTopBar from './app-top-bar' ;
@@ -56,7 +58,7 @@ export default function App({ children }: Readonly<PropsWithChildren<{}>>) {
56
58
( event : MessageEvent ) => {
57
59
const eventData = JSON . parse ( event . data ) ;
58
60
if ( eventData ?. headers ?. parameterName ) {
59
- ConfigSrv . fetchConfigParameter ( eventData . headers . parameterName )
61
+ fetchConfigParameter ( APP_NAME , eventData . headers . parameterName )
60
62
. then ( ( param ) => updateParams ( [ param ] ) )
61
63
. catch ( ( error ) => snackError ( { messageTxt : error . message , headerId : 'paramsRetrievingError' } ) ) ;
62
64
}
@@ -68,7 +70,7 @@ export default function App({ children }: Readonly<PropsWithChildren<{}>>) {
68
70
69
71
useEffect ( ( ) => {
70
72
if ( user !== null ) {
71
- ConfigSrv . fetchConfigParameters ( COMMON_APP_NAME )
73
+ fetchConfigParameters ( COMMON_APP_NAME )
72
74
. then ( ( params ) => updateParams ( params ) )
73
75
. catch ( ( error ) =>
74
76
snackError ( {
@@ -77,7 +79,7 @@ export default function App({ children }: Readonly<PropsWithChildren<{}>>) {
77
79
} )
78
80
) ;
79
81
80
- ConfigSrv . fetchConfigParameters ( APP_NAME )
82
+ fetchConfigParameters ( APP_NAME )
81
83
. then ( ( params ) => updateParams ( params ) )
82
84
. catch ( ( error ) =>
83
85
snackError ( {
0 commit comments