vega-frontend-monorepo/apps/trading/components/banner/announcement-banner.tsx
m.ray 835f2b793f
chore(trading): remove static assets console coming from vega.xyz (#4825)
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
2023-09-19 23:54:07 -07:00

20 lines
523 B
TypeScript

import { AnnouncementBanner as Banner } from '@vegaprotocol/announcements';
import { useEnvironment } from '@vegaprotocol/environment';
export const AnnouncementBanner = () => {
const { ANNOUNCEMENTS_CONFIG_URL } = useEnvironment();
// Return an empty div so that the grid layout in _app.page.ts
// renders correctly
if (!ANNOUNCEMENTS_CONFIG_URL) {
return null;
}
return (
<Banner
app="console"
configUrl={ANNOUNCEMENTS_CONFIG_URL}
background="url('/banner-bg.jpg')"
/>
);
};