From 8d17d05a5afb9a88417b062d289f6793ec1d4868 Mon Sep 17 00:00:00 2001 From: MananTank Date: Thu, 19 Dec 2024 22:02:30 +0000 Subject: [PATCH] [TOOL-2808] Dashboard: Remove Announcement banner (#5811) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Problem solved Short description of the bug fixed or feature added --- ## 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 `` with a comment `{/* Banner goes here */}`. - Updated `apps/dashboard/src/app/layout.tsx`: Similarly replaced `` 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}` --- apps/dashboard/knip.json | 5 ++++- apps/dashboard/src/app/layout.tsx | 3 +-- .../src/components/notices/AnnouncementBanner.tsx | 12 +----------- apps/dashboard/src/pages/_app.tsx | 3 +-- 4 files changed, 7 insertions(+), 16 deletions(-) diff --git a/apps/dashboard/knip.json b/apps/dashboard/knip.json index e8e87be3055..fa8063169b0 100644 --- a/apps/dashboard/knip.json +++ b/apps/dashboard/knip.json @@ -1,7 +1,10 @@ { "$schema": "https://unpkg.com/knip@5/schema.json", "next": true, - "ignore": ["src/@/components/ui/**"], + "ignore": [ + "src/@/components/ui/**", + "src/components/notices/AnnouncementBanner.tsx" + ], "project": ["src/**"], "ignoreBinaries": ["only-allow", "biome"], "ignoreDependencies": ["@storybook/blocks", "@thirdweb-dev/service-utils"] diff --git a/apps/dashboard/src/app/layout.tsx b/apps/dashboard/src/app/layout.tsx index ba3c8612d58..0b41c3148a5 100644 --- a/apps/dashboard/src/app/layout.tsx +++ b/apps/dashboard/src/app/layout.tsx @@ -7,7 +7,6 @@ import PlausibleProvider from "next-plausible"; import { Inter } from "next/font/google"; import NextTopLoader from "nextjs-toploader"; import { Suspense } from "react"; -import { UnlimitedWalletsBanner } from "../components/notices/AnnouncementBanner"; import { OpCreditsGrantedModalWrapperServer } from "../components/onboarding/OpCreditsGrantedModalWrapperServer"; import { EnsureValidConnectedWalletLoginServer } from "./components/EnsureValidConnectedWalletLogin/EnsureValidConnectedWalletLoginServer"; import { PostHogProvider } from "./components/root-providers"; @@ -72,7 +71,7 @@ export default function RootLayout({ fontSans.variable, )} > - + {/* Banner goes here */} {children} diff --git a/apps/dashboard/src/components/notices/AnnouncementBanner.tsx b/apps/dashboard/src/components/notices/AnnouncementBanner.tsx index c5cd7948f7a..97e7fd2d372 100644 --- a/apps/dashboard/src/components/notices/AnnouncementBanner.tsx +++ b/apps/dashboard/src/components/notices/AnnouncementBanner.tsx @@ -5,7 +5,7 @@ import { useLocalStorage } from "hooks/useLocalStorage"; import { ChevronRightIcon, XIcon } from "lucide-react"; import { useSelectedLayoutSegment } from "next/navigation"; -function AnnouncementBanner(props: { +export function AnnouncementBanner(props: { href: string; label: string; trackingLabel: string; @@ -56,13 +56,3 @@ function AnnouncementBanner(props: { ); } - -export function UnlimitedWalletsBanner() { - return ( - - ); -} diff --git a/apps/dashboard/src/pages/_app.tsx b/apps/dashboard/src/pages/_app.tsx index 14b148a2c2c..1af314236f0 100644 --- a/apps/dashboard/src/pages/_app.tsx +++ b/apps/dashboard/src/pages/_app.tsx @@ -22,7 +22,6 @@ import type { ThirdwebNextPage } from "utils/types"; import chakraTheme from "../theme"; import "@/styles/globals.css"; import { DashboardRouterTopProgressBar } from "@/lib/DashboardRouter"; -import { UnlimitedWalletsBanner } from "../components/notices/AnnouncementBanner"; const inter = interConstructor({ subsets: ["latin"], @@ -260,7 +259,7 @@ const ConsoleApp = memo(function ConsoleApp({ /> - + {/* Banner goes here */}