Skip to content

Commit d23c970

Browse files
authored
chore: app banner (#2780)
1 parent e11b18b commit d23c970

File tree

1 file changed

+91
-99
lines changed

1 file changed

+91
-99
lines changed

src/layouts/MainLayout.tsx

Lines changed: 91 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,133 +1,125 @@
11
import { ChainId } from '@aave/contract-helpers';
22
import { Box } from '@mui/material';
3-
import { useRouter } from 'next/router';
43
import React, { ReactNode } from 'react';
54
import AnalyticsConsent from 'src/components/Analytics/AnalyticsConsent';
65
// import { useModalContext } from 'src/hooks/useModal';
76
import { SupportModal } from 'src/layouts/SupportModal';
8-
import { useRootStore } from 'src/store/root';
9-
import { CustomMarket } from 'src/ui-config/marketsConfig';
107
import { FORK_ENABLED } from 'src/utils/marketsAndNetworksConfig';
11-
import { useShallow } from 'zustand/shallow';
128

139
import { AppFooter } from './AppFooter';
1410
import { AppHeader } from './AppHeader';
1511
import TopBarNotify from './TopBarNotify';
1612

17-
const getCampaignConfigs = (
18-
// openSwitch: (underlyingAsset: string) => void,
19-
openMarket: (market: CustomMarket) => void
20-
) => ({
13+
const getCampaignConfigs = () => ({
2114
[ChainId.base]: {
22-
notifyText: 'A new incentives campaign is live on the Base market',
23-
buttonText: 'Explore Base',
15+
notifyText: 'Introducing the Aave mobile app, a smarter way to save.',
16+
buttonText: 'Join waitlist',
2417
buttonAction: {
25-
type: 'route' as const,
26-
value: '/markets/?marketName=proto_base_v3',
18+
type: 'url' as const,
19+
value: 'https://aave.com/app',
20+
target: '_blank' as const,
2721
},
28-
bannerVersion: 'base-incentives-v1',
29-
icon: '/icons/networks/base.svg',
22+
bannerVersion: 'aave-app-waitlist-v1',
3023
},
3124

32-
// [ChainId.sonic]: {
33-
// notifyText: 'Swaps are now live on Sonic',
34-
// buttonText: 'Swap Now',
35-
// buttonAction: {
36-
// type: 'function' as const,
37-
// value: () => openSwitch('', ChainId.sonic),
38-
// },
39-
// bannerVersion: 'sonic-incentives-v1',
40-
// icon: '/icons/networks/sonic.svg',
41-
// },
25+
[ChainId.sonic]: {
26+
notifyText: 'Introducing the Aave mobile app, a smarter way to save.',
27+
buttonText: 'Join waitlist',
28+
buttonAction: {
29+
type: 'url' as const,
30+
value: 'https://aave.com/app',
31+
target: '_blank' as const,
32+
},
33+
bannerVersion: 'aave-app-waitlist-v1',
34+
icon: '/icons/networks/sonic.svg',
35+
},
4236

4337
[ChainId.mainnet]: {
44-
notifyText: "Horizon, Aave's RWA market, is now live.",
45-
buttonText: 'Get Started',
38+
notifyText: 'Introducing the Aave mobile app, a smarter way to save.',
39+
buttonText: 'Join waitlist',
4640
buttonAction: {
47-
type: 'function' as const,
48-
value: () => openMarket(CustomMarket.proto_horizon_v3),
41+
type: 'url' as const,
42+
value: 'https://aave.com/app',
43+
target: '_blank' as const,
4944
},
50-
bannerVersion: 'horizon-market-v1',
51-
icon: '/icons/markets/horizon.svg',
45+
bannerVersion: 'aave-app-waitlist-v1',
5246
},
5347

54-
// [ChainId.polygon]: {
55-
// notifyText: 'Swap tokens directly in the Aave App',
56-
// buttonText: 'Swap Now',
57-
// buttonAction: {
58-
// type: 'function' as const,
59-
// value: () => openSwitch('', ChainId.polygon),
60-
// },
61-
// bannerVersion: 'polygon-swap-v1',
62-
// icon: '/icons/networks/polygon.svg',
63-
// },
48+
[ChainId.polygon]: {
49+
notifyText: 'Introducing the Aave mobile app, a smarter way to save.',
50+
buttonText: 'Join waitlist',
51+
buttonAction: {
52+
type: 'url' as const,
53+
value: 'https://aave.com/app',
54+
target: '_blank' as const,
55+
},
56+
bannerVersion: 'aave-app-waitlist-v1',
57+
icon: '/icons/networks/polygon.svg',
58+
},
6459

65-
// [ChainId.avalanche]: {
66-
// notifyText: 'Swap tokens directly in the Aave App',
67-
// buttonText: 'Swap Now',
68-
// buttonAction: {
69-
// type: 'function' as const,
70-
// value: () => openSwitch('', ChainId.avalanche),
71-
// },
72-
// bannerVersion: 'avalanche-swap-v1',
73-
// icon: '/icons/networks/avalanche.svg',
74-
// },
60+
[ChainId.avalanche]: {
61+
notifyText: 'Introducing the Aave mobile app, a smarter way to save.',
62+
buttonText: 'Join waitlist',
63+
buttonAction: {
64+
type: 'url' as const,
65+
value: 'https://aave.com/app',
66+
target: '_blank' as const,
67+
},
68+
bannerVersion: 'aave-app-waitlist-v1',
69+
icon: '/icons/networks/avalanche.svg',
70+
},
7571

76-
// [ChainId.arbitrum_one]: {
77-
// notifyText: 'Swap tokens directly in the Aave App',
78-
// buttonText: 'Swap Now',
79-
// buttonAction: {
80-
// type: 'function' as const,
81-
// value: () => openSwitch('', ChainId.arbitrum_one),
82-
// },
83-
// bannerVersion: 'arbitrum-swap-v1',
84-
// icon: '/icons/networks/arbitrum.svg',
85-
// },
72+
[ChainId.arbitrum_one]: {
73+
notifyText: 'Introducing the Aave mobile app, a smarter way to save.',
74+
buttonText: 'Join waitlist',
75+
buttonAction: {
76+
type: 'url' as const,
77+
value: 'https://aave.com/app',
78+
target: '_blank' as const,
79+
},
80+
bannerVersion: 'aave-app-waitlist-v1',
81+
icon: '/icons/networks/arbitrum.svg',
82+
},
8683

87-
// [ChainId.optimism]: {
88-
// notifyText: 'Swap tokens directly in the Aave App',
89-
// buttonText: 'Swap Now',
90-
// buttonAction: {
91-
// type: 'function' as const,
92-
// value: () => openSwitch('', ChainId.optimism),
93-
// },
94-
// bannerVersion: 'optimism-swap-v1',
95-
// icon: '/icons/networks/optimism.svg',
96-
// },
84+
[ChainId.optimism]: {
85+
notifyText: 'Introducing the Aave mobile app, a smarter way to save.',
86+
buttonText: 'Join waitlist',
87+
buttonAction: {
88+
type: 'url' as const,
89+
value: 'https://aave.com/app',
90+
target: '_blank' as const,
91+
},
92+
bannerVersion: 'aave-app-waitlist-v1',
93+
icon: '/icons/networks/optimism.svg',
94+
},
9795

98-
// [ChainId.xdai]: {
99-
// notifyText: 'Swap tokens directly in the Aave App',
100-
// buttonText: 'Swap Now',
101-
// buttonAction: {
102-
// type: 'function' as const,
103-
// value: () => openSwitch('', ChainId.xdai),
104-
// },
105-
// bannerVersion: 'gnosis-swap-v1',
106-
// icon: '/icons/networks/gnosis.svg',
107-
// },
96+
[ChainId.xdai]: {
97+
notifyText: 'Introducing the Aave mobile app, a smarter way to save.',
98+
buttonText: 'Join waitlist',
99+
buttonAction: {
100+
type: 'url' as const,
101+
value: 'https://aave.com/app',
102+
target: '_blank' as const,
103+
},
104+
bannerVersion: 'aave-app-waitlist-v1',
105+
icon: '/icons/networks/gnosis.svg',
106+
},
108107

109-
// [ChainId.bnb]: {
110-
// notifyText: 'Swap tokens directly in the Aave App',
111-
// buttonText: 'Swap Now',
112-
// buttonAction: {
113-
// type: 'function' as const,
114-
// value: () => openSwitch('', ChainId.bnb),
115-
// },
116-
// bannerVersion: 'binance-swap-v1',
117-
// icon: '/icons/networks/binance.svg',
118-
// },
108+
[ChainId.bnb]: {
109+
notifyText: 'Introducing the Aave mobile app, a smarter way to save.',
110+
buttonText: 'Join waitlist',
111+
buttonAction: {
112+
type: 'url' as const,
113+
value: 'https://aave.com/app',
114+
target: '_blank' as const,
115+
},
116+
bannerVersion: 'aave-app-waitlist-v1',
117+
icon: '/icons/networks/binance.svg',
118+
},
119119
});
120120

121121
export function MainLayout({ children }: { children: ReactNode }) {
122-
const router = useRouter();
123-
const setCurrentMarket = useRootStore(useShallow((store) => store.setCurrentMarket));
124-
125-
const openMarket = (market: CustomMarket) => {
126-
setCurrentMarket(market);
127-
router.push(`/markets/?marketName=${market}`);
128-
};
129-
130-
const campaignConfigs = getCampaignConfigs(openMarket);
122+
const campaignConfigs = getCampaignConfigs();
131123

132124
return (
133125
<>

0 commit comments

Comments
 (0)