2023-03-29 13:20:49 +00:00
|
|
|
import { AnnouncementBanner } from '@vegaprotocol/announcements';
|
|
|
|
import { useEnvironment } from '@vegaprotocol/environment';
|
2023-02-03 10:34:32 +00:00
|
|
|
|
|
|
|
export const Banner = () => {
|
2023-03-29 13:20:49 +00:00
|
|
|
const { ANNOUNCEMENTS_CONFIG_URL } = useEnvironment();
|
2023-02-03 10:34:32 +00:00
|
|
|
|
|
|
|
// Return an empty div so that the grid layout in _app.page.ts
|
|
|
|
// renders correctly
|
2023-03-29 13:20:49 +00:00
|
|
|
if (!ANNOUNCEMENTS_CONFIG_URL) {
|
2023-02-03 10:34:32 +00:00
|
|
|
return <div />;
|
|
|
|
}
|
|
|
|
|
|
|
|
return (
|
2023-03-29 13:20:49 +00:00
|
|
|
<AnnouncementBanner app="console" configUrl={ANNOUNCEMENTS_CONFIG_URL} />
|
2023-02-03 10:34:32 +00:00
|
|
|
);
|
|
|
|
};
|