From dd934bfb11e79b44115d21ad1dd667ca7f206ae3 Mon Sep 17 00:00:00 2001 From: saml33 Date: Fri, 8 Dec 2023 08:00:56 +1100 Subject: [PATCH] add new listing banner --- components/Layout.tsx | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/components/Layout.tsx b/components/Layout.tsx index 73f2351c..5a696d1b 100644 --- a/components/Layout.tsx +++ b/components/Layout.tsx @@ -7,7 +7,11 @@ import { useMemo, useState, } from 'react' -import { ArrowPathIcon, ChevronRightIcon } from '@heroicons/react/20/solid' +import { + ArrowPathIcon, + ChevronRightIcon, + XMarkIcon, +} from '@heroicons/react/20/solid' import { nftThemeMeta } from '../utils/theme' import mangoStore from '@store/mangoStore' import BottomBar from './mobile/BottomBar' @@ -37,6 +41,7 @@ import TokenSlotsWarningModal, { } from './modals/TokenSlotsWarningModal' import useMangoAccount from 'hooks/useMangoAccount' import useUnownedAccount from 'hooks/useUnownedAccount' +import Link from 'next/link' export const sideBarAnimationDuration = 300 const termsLastUpdated = 1679441610978 @@ -52,6 +57,8 @@ const Layout = ({ children }: { children: ReactNode }) => { SLOTS_WARNING_KEY, undefined, ) + const [hasSeenNewListingBanner, setHasSeenNewListingBanner] = + useLocalStorageState('new-listing-banner-0.1', false) const { asPath } = useRouter() const { usedTokens, totalTokens } = useMangoAccountAccounts() const { mangoAccountAddress } = useMangoAccount() @@ -164,6 +171,35 @@ const Layout = ({ children }: { children: ReactNode }) => { }`} > + {!hasSeenNewListingBanner ? ( +
+
+ + JTO trading is live.{' '} + + Trade JTO + {' '} + |{' '} + + Swap JTO + + + +
+ ) : null} {asPath !== '/rewards' ? : null} {children}