@@ -15,7 +15,7 @@ import {
15
15
} from 'react' ;
16
16
import { capitalize , Tab , Tabs , useTheme } from '@mui/material' ;
17
17
import { ManageAccounts , PeopleAlt } from '@mui/icons-material' ;
18
- import { logout , TopBar } from '@gridsuite/commons-ui' ;
18
+ import { AppMetadataCommon , logout , TopBar } from '@gridsuite/commons-ui' ;
19
19
import { useParameterState } from '../parameters' ;
20
20
import {
21
21
APP_NAME ,
@@ -25,7 +25,7 @@ import {
25
25
import { NavLink , useMatches , useNavigate } from 'react-router-dom' ;
26
26
import { useDispatch , useSelector } from 'react-redux' ;
27
27
import { FormattedMessage } from 'react-intl' ;
28
- import { AppsMetadataSrv , MetadataJson , StudySrv } from '../../services' ;
28
+ import { AppsMetadataSrv , StudySrv } from '../../services' ;
29
29
import GridAdminLogoLight from '../../images/GridAdmin_logo_light.svg?react' ;
30
30
import GridAdminLogoDark from '../../images/GridAdmin_logo_dark.svg?react' ;
31
31
import AppPackage from '../../../package.json' ;
@@ -67,7 +67,7 @@ const tabs = new Map<MainPaths, ReactElement>([
67
67
const AppTopBar : FunctionComponent = ( ) => {
68
68
const theme = useTheme ( ) ;
69
69
const dispatch = useDispatch < AppDispatch > ( ) ;
70
- const user = useSelector ( ( state : AppState ) => state . user ) ;
70
+ const user = useSelector ( ( state : AppState ) => state . user ?? null ) ;
71
71
const userManagerInstance = useSelector (
72
72
( state : AppState ) => state . userManager ?. instance
73
73
) ;
@@ -87,7 +87,7 @@ const AppTopBar: FunctionComponent = () => {
87
87
const [ languageLocal , handleChangeLanguage ] =
88
88
useParameterState ( PARAM_LANGUAGE ) ;
89
89
90
- const [ appsAndUrls , setAppsAndUrls ] = useState < MetadataJson [ ] > ( [ ] ) ;
90
+ const [ appsAndUrls , setAppsAndUrls ] = useState < AppMetadataCommon [ ] > ( [ ] ) ;
91
91
useEffect ( ( ) => {
92
92
if ( user !== null ) {
93
93
AppsMetadataSrv . fetchAppsAndUrls ( ) . then ( ( res ) => {
0 commit comments