Skip to content

Commit 99adbe2

Browse files
committed
Add Unlimited wallets Banner, Add Team & Legacy dashboard links in headers (#4971)
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR primarily focuses on removing the `DashboardTypeBanner` component and replacing it with the `UnlimitedWalletsBanner` in various files. It also introduces a new tooltip in the `SecondaryNav` and makes minor adjustments to the `BillingHeader` and `AnnouncementBanner`. ### Detailed summary - Deleted `DashboardTypeBanner` component. - Replaced instances of `TryTeamsUIBanner` and `TeamsUIBanner` with `UnlimitedWalletsBanner`. - Added a tooltip in `SecondaryNav` for switching to the legacy dashboard. - Simplified `BillingHeader` by changing the heading style. - Updated `AnnouncementBanner` to include a new `UnlimitedWalletsBanner` function. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent d7e34f2 commit 99adbe2

File tree

11 files changed

+54
-39
lines changed

11 files changed

+54
-39
lines changed

apps/dashboard/src/app/(dashboard)/layout.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import { AppFooter } from "@/components/blocks/app-footer";
22
import { ErrorProvider } from "../../contexts/error-handler";
3-
import { TryTeamsUIBanner } from "../components/DashboardTypeBanner";
43
import { DashboardHeader } from "../components/Header/DashboardHeader";
54

65
export default function DashboardLayout(props: { children: React.ReactNode }) {
76
return (
87
<ErrorProvider>
98
<div className="flex min-h-screen flex-col bg-background">
10-
<TryTeamsUIBanner />
119
<DashboardHeader />
1210
<main className="grow">{props.children}</main>
1311
<AppFooter />

apps/dashboard/src/app/account/layout.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { DashboardTypeCookieSetter } from "@/components/DashboardTypeCookieSette
44
import { SidebarLayout } from "@/components/blocks/SidebarLayout";
55
import { AppFooter } from "@/components/blocks/app-footer";
66
import type React from "react";
7-
import { TeamsUIBanner } from "../components/DashboardTypeBanner";
87
import { TWAutoConnect } from "../components/autoconnect";
98
import { AccountHeader } from "./components/AccountHeader";
109

@@ -13,7 +12,6 @@ export default async function AccountLayout(props: {
1312
}) {
1413
return (
1514
<div className="flex min-h-screen flex-col bg-background">
16-
<TeamsUIBanner />
1715
<div className="flex grow flex-col">
1816
<HeaderAndNav />
1917
<div className="border-border border-b py-10">

apps/dashboard/src/app/components/DashboardTypeBanner.tsx

Lines changed: 0 additions & 21 deletions
This file was deleted.

apps/dashboard/src/app/components/Header/DashboardHeader.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { NavLink } from "@/components/ui/NavLink";
2+
import { Badge } from "@/components/ui/badge";
23
import { Button } from "@/components/ui/button";
34
import { CustomConnectWallet } from "@3rdweb-sdk/react/components/connect-wallet";
45
import { CmdKSearch } from "components/cmd-k-search";
@@ -25,6 +26,19 @@ export const DashboardHeader: React.FC = () => {
2526

2627
{/* Right */}
2728
<div className="flex items-center gap-2">
29+
<NavLink
30+
href="/team"
31+
tracking={{
32+
category: "header",
33+
action: "click",
34+
label: "team-dashboard",
35+
}}
36+
className="hidden items-center gap-1.5 px-2.5 text-muted-foreground text-sm hover:text-foreground md:inline-flex"
37+
activeClassName="text-foreground"
38+
>
39+
Team Dashboard <Badge className="px-1.5"> BETA </Badge>
40+
</NavLink>
41+
2842
<div className="hidden gap-2 md:flex">
2943
<Suspense fallback={null}>
3044
<CreditsButton />

apps/dashboard/src/app/components/Header/SecondaryNav/SecondaryNav.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
import { ToolTipLabel } from "@/components/ui/tooltip";
12
import type { Account } from "@3rdweb-sdk/react/hooks/useApi";
3+
import { ArrowUpDownIcon } from "lucide-react";
24
import Link from "next/link";
35
import type React from "react";
46
import { ResourcesDropdownButton } from "./ResourcesDropdownButton";
@@ -11,6 +13,23 @@ export function SecondaryNav(props: {
1113
}) {
1214
return (
1315
<div className="flex items-center gap-6">
16+
<ToolTipLabel
17+
label={
18+
<span>
19+
You are exploring the new dashboard. <br /> Click here to go back to
20+
the legacy dashboard.
21+
</span>
22+
}
23+
>
24+
<Link
25+
href="/dashboard"
26+
className="inline-flex items-center gap-1.5 text-muted-foreground text-sm hover:text-foreground"
27+
>
28+
<ArrowUpDownIcon className="size-4" />
29+
Switch To Legacy Dashboard
30+
</Link>
31+
</ToolTipLabel>
32+
1433
<ResourcesDropdownButton />
1534

1635
<Link

apps/dashboard/src/app/layout.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import PlausibleProvider from "next-plausible";
77
import dynamic from "next/dynamic";
88
import { Inter } from "next/font/google";
99
import NextTopLoader from "nextjs-toploader";
10+
import { UnlimitedWalletsBanner } from "../components/notices/AnnouncementBanner";
1011
import { PostHogProvider } from "./components/root-providers";
1112
import { AppRouterProviders } from "./providers";
1213

@@ -70,6 +71,7 @@ export default function RootLayout({
7071
)}
7172
>
7273
<PostHogPageView />
74+
<UnlimitedWalletsBanner />
7375
<AppRouterProviders>{children}</AppRouterProviders>
7476
<Toaster richColors />
7577
<DashboardRouterTopProgressBar />

apps/dashboard/src/app/login/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { doLogin, doLogout, getLoginPayload, isLoggedIn } from "./auth-actions";
1515
export default function LoginPage() {
1616
return (
1717
<div className="relative grid h-screen place-items-center bg-muted/30">
18-
<nav className="fixed top-0 z-20 flex w-full flex-row items-center justify-between px-6 py-4">
18+
<nav className="absolute top-0 z-20 flex w-full flex-row items-center justify-between px-6 py-4">
1919
<ThirdwebMiniLogo className="max-h-7" />
2020
<ColorModeToggle />
2121
</nav>

apps/dashboard/src/app/team/[team_slug]/layout.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { DashboardTypeCookieSetter } from "@/components/DashboardTypeCookieSetter";
22
import { AppFooter } from "@/components/blocks/app-footer";
3-
import { TeamsUIBanner } from "../../components/DashboardTypeBanner";
43
import { TWAutoConnect } from "../../components/autoconnect";
54

65
export default function RootTeamLayout(props: {
@@ -9,7 +8,6 @@ export default function RootTeamLayout(props: {
98
}) {
109
return (
1110
<div className="flex min-h-screen flex-col">
12-
<TeamsUIBanner />
1311
<div className="flex grow flex-col">{props.children}</div>
1412
<TWAutoConnect />
1513
<AppFooter />

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { TrackedLinkTW } from "@/components/ui/tracked-link";
44
import { useLocalStorage } from "hooks/useLocalStorage";
55
import { ChevronRightIcon, XIcon } from "lucide-react";
66

7-
export function AnnouncementBanner(props: {
7+
function AnnouncementBanner(props: {
88
href: string;
99
label: string;
1010
trackingLabel: string;
@@ -29,9 +29,9 @@ export function AnnouncementBanner(props: {
2929
category="announcement"
3030
label={props.trackingLabel}
3131
target={props.href.startsWith("http") ? "_blank" : undefined}
32-
className="container flex cursor-pointer items-center gap-2 lg:justify-center"
32+
className="!text-white container flex cursor-pointer items-center gap-2 lg:justify-center "
3333
>
34-
<span className="inline-block font-semibold text-white leading-normal hover:underline">
34+
<span className="inline-block font-semibold leading-normal hover:underline">
3535
{props.label}
3636
</span>
3737
<ChevronRightIcon className="hidden size-5 opacity-80 lg:block" />
@@ -49,3 +49,13 @@ export function AnnouncementBanner(props: {
4949
</div>
5050
);
5151
}
52+
53+
export function UnlimitedWalletsBanner() {
54+
return (
55+
<AnnouncementBanner
56+
href="/dashboard/settings/billing?coupon=FREEWALLETS"
57+
label='Get 12 months of unlimited in-app wallets by applying the "FREEWALLETS" coupon in the billing dashboard'
58+
trackingLabel="unlimited-wallets"
59+
/>
60+
);
61+
}

apps/dashboard/src/components/settings/Account/Billing/Header.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Flex, Icon } from "@chakra-ui/react";
22
import { FiAlertCircle, FiCheckCircle, FiInfo } from "react-icons/fi";
3-
import { Badge, Heading, Text } from "tw-components";
3+
import { Badge, Text } from "tw-components";
44

55
interface BillingHeaderProps {
66
validPayment: boolean;
@@ -12,10 +12,8 @@ export const BillingHeader: React.FC<BillingHeaderProps> = ({
1212
paymentVerification,
1313
}) => {
1414
return (
15-
<Flex direction="column" gap={2}>
16-
<Heading size="title.lg" as="h1">
17-
Billing Info
18-
</Heading>
15+
<Flex direction="column" gap={1}>
16+
<h1 className="font-semibold text-xl tracking-tight">Billing Info</h1>
1917

2018
<div className="flex flex-row items-center gap-2">
2119
<Text size="body.md">

0 commit comments

Comments
 (0)