feat: replace V4 announcement banner with permanent header button - #3089
Conversation
Remove the top-bar V4 announcement campaign and surface Aave V4 as a permanent destination in the header instead. - Empty getCampaignConfigs() in MainLayout, dropping the ten identical per-chain "Aave V4 is now live" entries. TopBarNotify stays mounted and renders null with no matching campaign, so the banner mechanism remains available for future campaigns. - Add an "Aave V4" button to the left of Bridge GHO, linking to pro.aave.com. The Link primitive applies target="_blank" rel="noopener" for external hrefs. Label shortens to "V4" below 1120px so the header stays on a single line. - Export AAVE_PRO_URL from MarketSwitcher rather than duplicating the URL. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Mjolnir Security Review
11 PRs reviewed |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
📦 Next.js Bundle Analysis for aave-uiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 🎉 Global Bundle Size Decreased
DetailsThe global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster. Any third party scripts you have added directly to your app using the If you want further insight into what is behind the changes, give @next/bundle-analyzer a try! Six Pages Changed SizeThe following pages changed size from the code in this PR compared to its base branch:
DetailsOnly the gzipped size is provided here based on an expert tip. First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If Any third party scripts you have added directly to your app using the Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. |
Summary
Retires the top-bar Aave V4 announcement campaign and surfaces V4 as a permanent destination in the header instead.
Changes
Banner removed —
getCampaignConfigs()inMainLayoutis now() => ({}), dropping the ten byte-identical per-chain "Aave V4 is now live on Ethereum mainnet." entries (base, sonic, mainnet, polygon, avalanche, arbitrum, optimism, xdai, bnb, ink). That was the only live campaign —routeCampaignsis empty, its one sGHO/OKX entry commented out.TopBarNotifystays mounted and returnsnullwhen no campaign matches the current chain, so the banner mechanism remains available for the next campaign rather than being deleted.Header button added — an "Aave V4" button sits to the left of Bridge GHO, linking to
pro.aave.com. It mirrors the existing Bridge GHO / Swap buttons:variant="surface", same padding and spacing. TheLinkprimitive appliestarget="_blank" rel="noopener"automatically for external hrefs, so no explicit target is needed.The label shortens to
V4below 1120px. Its neighbours hide their labels at that breakpoint and fall back to an icon; this button is text-only, so it shortens instead — keeping "Aave V4" at every width wraps the label to two lines, overflows the 48px header, and pushes "Connect wallet" to wrap too.AAVE_PRO_URLis now exported fromMarketSwitcherinstead of the URL being duplicated.Testing
tsc --noEmit, eslint, and prettier all clean; no new warnings in the touched files.V4, header on a single line), and 420px (V4beside the icon buttons, mobile menu intact).Note
Users who dismissed the old banner keep stale
bannerVersion_*/warningBarOpen_*localStorage keys. They're inert and get overwritten by the next campaign'sbannerVersion, so no cleanup code was added.🤖 Generated with Claude Code