Skip to content

Commit 04a66a6

Browse files
Update commons-ui
1 parent 250abb4 commit 04a66a6

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/components/App/app-top-bar.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
} from 'react';
1717
import { capitalize, Tab, Tabs, useTheme } from '@mui/material';
1818
import { Groups, ManageAccounts, NotificationImportant, PeopleAlt } from '@mui/icons-material';
19-
import { fetchAppsMetadata, logout, Metadata, TopBar, useGlobalAnnouncement } from '@gridsuite/commons-ui';
19+
import { fetchAppsMetadata, logout, Metadata, TopBar } from '@gridsuite/commons-ui';
2020
import { useParameterState } from '../parameters';
2121
import { APP_NAME, PARAM_LANGUAGE, PARAM_THEME } from '../../utils/config-params';
2222
import { NavLink, type To, useMatches, useNavigate } from 'react-router';
@@ -111,8 +111,6 @@ const AppTopBar: FunctionComponent = () => {
111111

112112
const [appsAndUrls, setAppsAndUrls] = useState<Metadata[]>([]);
113113

114-
const announcementInfos = useGlobalAnnouncement(user);
115-
116114
useEffect(() => {
117115
if (user !== null) {
118116
fetchAppsMetadata().then((res) => {
@@ -139,7 +137,6 @@ const AppTopBar: FunctionComponent = () => {
139137
onLanguageClick={handleChangeLanguage}
140138
language={languageLocal}
141139
developerMode={false} // TODO: set as optional in commons-ui
142-
announcementInfos={announcementInfos}
143140
>
144141
<Tabs
145142
component="nav"

src/components/App/app.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { FunctionComponent, PropsWithChildren, useCallback, useEffect } from 're
99
import { useDispatch, useSelector } from 'react-redux';
1010
import { Grid } from '@mui/material';
1111
import {
12+
AnnouncementNotification,
1213
CardErrorBoundary,
1314
NotificationsUrlKeys,
1415
useNotificationsListener,
@@ -97,6 +98,9 @@ const App: FunctionComponent<PropsWithChildren<{}>> = (props, context) => {
9798
sx={{ height: '100vh', width: '100vw' }}
9899
>
99100
<Grid item xs="auto" component={AppTopBar} />
101+
<Grid item xs="auto">
102+
<AnnouncementNotification user={user} />
103+
</Grid>
100104
<Grid item container xs component="main">
101105
<CardErrorBoundary>{/*Router outlet ->*/ props.children}</CardErrorBoundary>
102106
</Grid>

0 commit comments

Comments
 (0)