Skip to content

Commit 8d17d05

Browse files
committed
[TOOL-2808] Dashboard: Remove Announcement banner (#5811)
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on updating the handling of the `UnlimitedWalletsBanner` component in the dashboard application by removing its direct usage and replacing it with a placeholder comment, while also modifying the `knip.json` configuration to include an additional file in the ignore list. ### Detailed summary - Updated `apps/dashboard/knip.json`: Added `src/components/notices/AnnouncementBanner.tsx` to the `ignore` array. - Modified `apps/dashboard/src/pages/_app.tsx`: Replaced `<UnlimitedWalletsBanner />` with a comment `{/* Banner goes here */}`. - Updated `apps/dashboard/src/app/layout.tsx`: Similarly replaced `<UnlimitedWalletsBanner />` with a comment `{/* Banner goes here */}`. - Changed `AnnouncementBanner` function to `export function AnnouncementBanner`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent fd4664a commit 8d17d05

File tree

4 files changed

+7
-16
lines changed

4 files changed

+7
-16
lines changed

apps/dashboard/knip.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
{
22
"$schema": "https://unpkg.com/knip@5/schema.json",
33
"next": true,
4-
"ignore": ["src/@/components/ui/**"],
4+
"ignore": [
5+
"src/@/components/ui/**",
6+
"src/components/notices/AnnouncementBanner.tsx"
7+
],
58
"project": ["src/**"],
69
"ignoreBinaries": ["only-allow", "biome"],
710
"ignoreDependencies": ["@storybook/blocks", "@thirdweb-dev/service-utils"]

apps/dashboard/src/app/layout.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import PlausibleProvider from "next-plausible";
77
import { Inter } from "next/font/google";
88
import NextTopLoader from "nextjs-toploader";
99
import { Suspense } from "react";
10-
import { UnlimitedWalletsBanner } from "../components/notices/AnnouncementBanner";
1110
import { OpCreditsGrantedModalWrapperServer } from "../components/onboarding/OpCreditsGrantedModalWrapperServer";
1211
import { EnsureValidConnectedWalletLoginServer } from "./components/EnsureValidConnectedWalletLogin/EnsureValidConnectedWalletLoginServer";
1312
import { PostHogProvider } from "./components/root-providers";
@@ -72,7 +71,7 @@ export default function RootLayout({
7271
fontSans.variable,
7372
)}
7473
>
75-
<UnlimitedWalletsBanner />
74+
{/* Banner goes here */}
7675
<AppRouterProviders>
7776
{children}
7877
<Suspense fallback={null}>

apps/dashboard/src/components/notices/AnnouncementBanner.tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { useLocalStorage } from "hooks/useLocalStorage";
55
import { ChevronRightIcon, XIcon } from "lucide-react";
66
import { useSelectedLayoutSegment } from "next/navigation";
77

8-
function AnnouncementBanner(props: {
8+
export function AnnouncementBanner(props: {
99
href: string;
1010
label: string;
1111
trackingLabel: string;
@@ -56,13 +56,3 @@ function AnnouncementBanner(props: {
5656
</div>
5757
);
5858
}
59-
60-
export function UnlimitedWalletsBanner() {
61-
return (
62-
<AnnouncementBanner
63-
href="/team/~/~/settings/billing?coupon=FREEWALLETS24"
64-
label='Claim 12 months of free in-app wallets. Use code "FREEWALLETS24". Redeem offer by December 31st!'
65-
trackingLabel="unlimited-wallets"
66-
/>
67-
);
68-
}

apps/dashboard/src/pages/_app.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import type { ThirdwebNextPage } from "utils/types";
2222
import chakraTheme from "../theme";
2323
import "@/styles/globals.css";
2424
import { DashboardRouterTopProgressBar } from "@/lib/DashboardRouter";
25-
import { UnlimitedWalletsBanner } from "../components/notices/AnnouncementBanner";
2625

2726
const inter = interConstructor({
2827
subsets: ["latin"],
@@ -260,7 +259,7 @@ const ConsoleApp = memo(function ConsoleApp({
260259
/>
261260

262261
<DashboardRouterTopProgressBar />
263-
<UnlimitedWalletsBanner />
262+
{/* Banner goes here */}
264263

265264
<TailwindTheme>
266265
<ChakraProvider theme={chakraThemeWithFonts}>

0 commit comments

Comments
 (0)