From 1040077c2b5868a37c7b416ceaf03ec5bebc5d4b Mon Sep 17 00:00:00 2001 From: Edd Date: Fri, 10 Mar 2023 16:12:30 +0000 Subject: [PATCH] feat(explorer,trading,governance): update mainnet sims banner (#3156) Co-authored-by: asiaznik --- apps/explorer/src/app/app.tsx | 43 ++++++++++++++----- .../page-templates/template-sidebar.tsx | 2 +- apps/trading/components/banner/banner.tsx | 2 +- 3 files changed, 34 insertions(+), 13 deletions(-) diff --git a/apps/explorer/src/app/app.tsx b/apps/explorer/src/app/app.tsx index 8aac5da50..3afc1573c 100644 --- a/apps/explorer/src/app/app.tsx +++ b/apps/explorer/src/app/app.tsx @@ -3,13 +3,18 @@ import { Header } from './components/header'; import { Main } from './components/main'; import { TendermintWebsocketProvider } from './contexts/websocket/tendermint-websocket-provider'; import { Footer } from './components/footer/footer'; -import { AnnouncementBanner, ExternalLink } from '@vegaprotocol/ui-toolkit'; +import { + AnnouncementBanner, + ExternalLink, + Icon, +} from '@vegaprotocol/ui-toolkit'; import { AssetDetailsDialog, useAssetDetailsDialogStore, } from '@vegaprotocol/assets'; import { DEFAULT_CACHE_CONFIG } from '@vegaprotocol/apollo-client'; import classNames from 'classnames'; +import { useState } from 'react'; const DialogsContainer = () => { const { isOpen, id, trigger, asJson, setOpen } = useAssetDetailsDialogStore(); @@ -24,16 +29,32 @@ const DialogsContainer = () => { ); }; -const MainnetSimAd = () => ( - -
- Mainnet sim 2 is live! - - Come help stress test the network - -
-
-); +const MainnetSimAd = () => { + const [shouldDisplayBanner, setShouldDisplayBanner] = useState(true); + + // Return an empty div so that the grid layout in _app.page.ts + // renders correctly + if (!shouldDisplayBanner) { + return
; + } + + return ( + +
+ +
+ Mainnet sim 3 is coming soon! + Learn more +
+
+
+ ); +}; function App() { return ( diff --git a/apps/governance/src/components/page-templates/template-sidebar.tsx b/apps/governance/src/components/page-templates/template-sidebar.tsx index 503fbf04f..baa77a1ae 100644 --- a/apps/governance/src/components/page-templates/template-sidebar.tsx +++ b/apps/governance/src/components/page-templates/template-sidebar.tsx @@ -21,7 +21,7 @@ export function TemplateSidebar({ children, sidebar }: TemplateSidebarProps) { <>
- Mainnet sim 2 is live! + Mainnet sim 3 is coming soon! Come help stress test the network diff --git a/apps/trading/components/banner/banner.tsx b/apps/trading/components/banner/banner.tsx index 7333d723a..05124da22 100644 --- a/apps/trading/components/banner/banner.tsx +++ b/apps/trading/components/banner/banner.tsx @@ -30,7 +30,7 @@ export const Banner = () => {
- Mainnet sim 2 is live! + Mainnet sim 3 is coming soon! Learn more