2023-02-03 10:34:32 +00:00
|
|
|
import {
|
|
|
|
AnnouncementBanner,
|
|
|
|
ExternalLink,
|
|
|
|
Icon,
|
|
|
|
} from '@vegaprotocol/ui-toolkit';
|
|
|
|
import { useGlobalStore } from '../../stores';
|
2023-02-13 16:48:16 +00:00
|
|
|
import React from 'react';
|
2023-02-03 10:34:32 +00:00
|
|
|
|
|
|
|
export const Banner = () => {
|
|
|
|
const { update, shouldDisplayAnnouncementBanner } = useGlobalStore(
|
|
|
|
(store) => ({
|
|
|
|
update: store.update,
|
|
|
|
shouldDisplayAnnouncementBanner: store.shouldDisplayAnnouncementBanner,
|
|
|
|
})
|
|
|
|
);
|
|
|
|
|
|
|
|
// Return an empty div so that the grid layout in _app.page.ts
|
|
|
|
// renders correctly
|
|
|
|
if (!shouldDisplayAnnouncementBanner) {
|
|
|
|
return <div />;
|
|
|
|
}
|
|
|
|
|
|
|
|
return (
|
|
|
|
<AnnouncementBanner>
|
|
|
|
<div className="grid grid-cols-[auto_1fr] gap-4 font-alpha calt uppercase text-center text-lg text-white">
|
|
|
|
<button
|
2023-03-02 09:32:42 +00:00
|
|
|
className="flex items-center"
|
2023-02-03 10:34:32 +00:00
|
|
|
onClick={() => update({ shouldDisplayAnnouncementBanner: false })}
|
|
|
|
>
|
|
|
|
<Icon name="cross" className="w-6 h-6" ariaLabel="dismiss" />
|
|
|
|
</button>
|
|
|
|
<div>
|
2023-02-28 17:21:57 +00:00
|
|
|
<span className="pr-4">Mainnet sim 2 is live!</span>
|
2023-02-13 16:48:16 +00:00
|
|
|
<ExternalLink href="https://fairground.wtf/">Learn more</ExternalLink>
|
2023-02-03 10:34:32 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</AnnouncementBanner>
|
|
|
|
);
|
|
|
|
};
|