Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/dashboard/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ 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";
Expand Down Expand Up @@ -71,7 +72,7 @@ export default function RootLayout({
fontSans.variable,
)}
>
{/* Banner goes here */}
<UnlimitedWalletsBanner />
<AppRouterProviders>
{children}
<Suspense fallback={null}>
Expand Down
18 changes: 18 additions & 0 deletions apps/dashboard/src/components/notices/AnnouncementBanner.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"use client";
import { Button } from "@/components/ui/button";
import { TrackedLinkTW } from "@/components/ui/tracked-link";
import { isAfter } from "date-fns";
import { useLocalStorage } from "hooks/useLocalStorage";
import { ChevronRightIcon, XIcon } from "lucide-react";
import { useSelectedLayoutSegment } from "next/navigation";
Expand Down Expand Up @@ -56,3 +57,20 @@ export function AnnouncementBanner(props: {
</div>
);
}

export function UnlimitedWalletsBanner() {
// hide banner after 31st December 2024
const shouldHideBanner = isAfter(new Date(), new Date("31 Dec 2024"));

if (shouldHideBanner) {
return null;
}

return (
<AnnouncementBanner
href="/team/~/~/settings/billing?coupon=FREEWALLETS24"
label='Claim 12 months of free in-app wallets. Use code "FREEWALLETS24". Redeem offer by December 31st!'
trackingLabel="unlimited-wallets"
/>
);
}
3 changes: 2 additions & 1 deletion apps/dashboard/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ 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"],
Expand Down Expand Up @@ -259,7 +260,7 @@ const ConsoleApp = memo(function ConsoleApp({
/>

<DashboardRouterTopProgressBar />
{/* Banner goes here */}
<UnlimitedWalletsBanner />

<TailwindTheme>
<ChakraProvider theme={chakraThemeWithFonts}>
Expand Down
Loading