Skip to content

Commit 9808ce4

Browse files
authored
chore: update banner (#2367)
1 parent e9fc6a6 commit 9808ce4

File tree

2 files changed

+34
-9
lines changed

2 files changed

+34
-9
lines changed

src/layouts/MainLayout.tsx

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,43 @@ import { Box } from '@mui/material';
22
import React, { ReactNode } from 'react';
33
import AnalyticsConsent from 'src/components/Analytics/AnalyticsConsent';
44
import { FeedbackModal } from 'src/layouts/FeedbackDialog';
5+
import { useRootStore } from 'src/store/root';
56
import { FORK_ENABLED } from 'src/utils/marketsAndNetworksConfig';
67

78
import { AppFooter } from './AppFooter';
89
import { AppHeader } from './AppHeader';
9-
// import TopBarNotify from './TopBarNotify';
10+
import TopBarNotify from './TopBarNotify';
1011

12+
const SwitchIcon = () => (
13+
<svg
14+
xmlns="http://www.w3.org/2000/svg"
15+
fill="none"
16+
viewBox="0 0 24 24"
17+
strokeWidth="1.5"
18+
stroke="currentColor"
19+
style={{ marginLeft: '8px', width: '24px', height: '24px' }}
20+
>
21+
<path
22+
strokeLinecap="round"
23+
strokeLinejoin="round"
24+
d="M7.5 21L3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5"
25+
/>
26+
</svg>
27+
);
1128
export function MainLayout({ children }: { children: ReactNode }) {
12-
// const APP_BANNER_VERSION = '5.0.0';
13-
29+
const APP_BANNER_VERSION = '6.0.0';
30+
const currentMarket = useRootStore((state) => state.currentMarket);
1431
return (
1532
<>
16-
{/* <TopBarNotify
17-
learnMoreLink="https://oh7vm38ynd2.typeform.com/to/Fnw3rMyw"
18-
notifyText="Looking to provide product feedback? We'd love to hear from you! 👉"
19-
bannerVersion={APP_BANNER_VERSION}
20-
buttonText="Share feedback"
21-
/> */}
33+
{currentMarket === 'proto_base_v3' && (
34+
<TopBarNotify
35+
// learnMoreLink="https://oh7vm38ynd2.typeform.com/to/Fnw3rMyw"
36+
notifyText="Debt swaps are now live on Base!"
37+
bannerVersion={APP_BANNER_VERSION}
38+
customIcon={<SwitchIcon />}
39+
/>
40+
)}
41+
2242
<AppHeader />
2343
<Box component="main" sx={{ display: 'flex', flexDirection: 'column', flex: 1 }}>
2444
{children}

src/layouts/TopBarNotify.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ interface TopBarNotifyProps {
1717
buttonText?: string;
1818
bannerVersion: string;
1919
icon?: string;
20+
customIcon?: ReactNode;
2021
}
2122

2223
export default function TopBarNotify({
@@ -25,6 +26,7 @@ export default function TopBarNotify({
2526
buttonText,
2627
bannerVersion,
2728
icon,
29+
customIcon,
2830
}: TopBarNotifyProps) {
2931
const { breakpoints } = useTheme();
3032
const md = useMediaQuery(breakpoints.down('md'));
@@ -86,6 +88,8 @@ export default function TopBarNotify({
8688
>
8789
<Trans>{notifyText}</Trans>
8890

91+
{customIcon ? customIcon : null}
92+
8993
{icon && !sm ? <MarketLogo sx={{ ml: 2 }} size={32} logo={icon} /> : ''}
9094

9195
{learnMoreLink && md ? (
@@ -99,6 +103,7 @@ export default function TopBarNotify({
99103
) : null}
100104
</Typography>
101105
</Box>
106+
102107
<Box>
103108
{!md && learnMoreLink ? (
104109
<Button

0 commit comments

Comments
 (0)