Skip to content

Commit 94ba9cf

Browse files
committed
[TOOL-3091] Dashboard: Remove trending contracts, Hide Contract Search (#5978)
1 parent 1b64d6e commit 94ba9cf

File tree

14 files changed

+24
-521
lines changed

14 files changed

+24
-521
lines changed

apps/dashboard/knip.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
"next": true,
44
"ignore": [
55
"src/@/components/ui/**",
6-
"src/components/notices/AnnouncementBanner.tsx"
6+
"src/components/notices/AnnouncementBanner.tsx",
7+
"src/components/cmd-k-search/index.tsx",
8+
"src/lib/search.ts"
79
],
810
"project": ["src/**"],
911
"ignoreBinaries": ["only-allow", "biome"],

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/layout.tsx

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { MobileSidebar } from "@/components/blocks/MobileSidebar";
2-
import { Sidebar } from "@/components/blocks/Sidebar";
31
import {
42
Breadcrumb,
53
BreadcrumbItem,
@@ -15,12 +13,7 @@ import {
1513
DropdownMenuItem,
1614
DropdownMenuTrigger,
1715
} from "@/components/ui/dropdown-menu";
18-
import {
19-
ArrowLeftIcon,
20-
ChevronDownIcon,
21-
MenuIcon,
22-
TicketCheckIcon,
23-
} from "lucide-react";
16+
import { ChevronDownIcon, TicketCheckIcon } from "lucide-react";
2417
import type { Metadata } from "next";
2518
import Link from "next/link";
2619
import { redirect } from "next/navigation";
@@ -71,18 +64,6 @@ export default async function ChainPageLayout(props: {
7164

7265
const chainMetadata = await getChainMetadata(chain.chainId);
7366

74-
const sidebarLinks = [
75-
{
76-
href: `/${chain.slug}`,
77-
label: "Overview",
78-
exactMatch: true,
79-
},
80-
{
81-
href: `/${chain.slug}/popular`,
82-
label: "Popular Contracts",
83-
},
84-
];
85-
8667
return (
8768
<>
8869
<div className="flex h-14 border-border border-b pl-7">
@@ -125,9 +106,7 @@ export default async function ChainPageLayout(props: {
125106
</BreadcrumbList>
126107
</Breadcrumb>
127108
</div>
128-
<div className="container flex h-full flex-row">
129-
<Sidebar links={sidebarLinks} />
130-
109+
<div className="container flex h-full max-w-[1180px] flex-row">
131110
<div className="flex w-full flex-col pb-10">
132111
{/* Icon + Background */}
133112
<ChainHeader
@@ -136,28 +115,6 @@ export default async function ChainPageLayout(props: {
136115
chain={chain}
137116
/>
138117

139-
<div className="flex justify-end lg:hidden">
140-
<MobileSidebar
141-
links={sidebarLinks}
142-
trigger={
143-
<Button size="icon" variant="outline">
144-
<MenuIcon strokeWidth={1} />
145-
</Button>
146-
}
147-
footer={
148-
<div className="mt-5 border-t pt-6 pb-2">
149-
<Link
150-
href="/chainlist"
151-
className="flex items-center justify-start gap-2 px-2 text-muted-foreground text-sm hover:text-foreground"
152-
>
153-
<ArrowLeftIcon className="size-4" />
154-
View all chains
155-
</Link>
156-
</div>
157-
}
158-
/>
159-
</div>
160-
161118
<div className="h-4 md:h-8" />
162119

163120
<div className="flex flex-col gap-3 md:gap-2">

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/page.tsx

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
import { Button } from "@/components/ui/button";
2-
import { fetchTopContracts } from "lib/search";
3-
import { ArrowRightIcon, CircleAlertIcon } from "lucide-react";
4-
import Link from "next/link";
1+
import { CircleAlertIcon } from "lucide-react";
52
import { getRawAccount } from "../../../../account/settings/getAccount";
6-
import { TrendingContractSection } from "../../../trending/components/trending-table";
73
import { getChain, getChainMetadata } from "../../utils";
84
import { BuyFundsSection } from "./components/server/BuyFundsSection";
95
import { ChainOverviewSection } from "./components/server/ChainOverviewSection";
@@ -21,14 +17,7 @@ export default async function Page(props: {
2117
const chainMetadata = await getChainMetadata(chain.chainId);
2218
const isDeprecated = chain.status === "deprecated";
2319

24-
const [account, topContracts] = await Promise.all([
25-
getRawAccount(),
26-
fetchTopContracts({
27-
chainId: chain.chainId,
28-
perPage: 3,
29-
timeRange: "month",
30-
}),
31-
]);
20+
const account = await getRawAccount();
3221

3322
return (
3423
<div className="flex flex-col gap-10">
@@ -65,31 +54,6 @@ export default async function Page(props: {
6554
<ExplorersSection explorers={chain.explorers} />
6655
)}
6756

68-
{topContracts.length > 0 && (
69-
<section>
70-
<div className="mb-3 flex items-center justify-between">
71-
<h2 className="font-semibold text-xl tracking-tight">
72-
Popular Contracts
73-
</h2>
74-
<Button asChild variant="outline">
75-
<Link
76-
href={`/${chain.slug}/popular`}
77-
className="flex items-center gap-2"
78-
>
79-
See All
80-
<ArrowRightIcon className="size-4" />
81-
</Link>
82-
</Button>
83-
</div>
84-
<TrendingContractSection
85-
topContracts={topContracts}
86-
chainId={chain.chainId}
87-
showPagination={false}
88-
searchParams={undefined}
89-
/>
90-
</section>
91-
)}
92-
9357
{chain.services.filter((s) => s.enabled).length > 0 && (
9458
<SupportedProductsSection services={chain.services} />
9559
)}

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/popular/page.tsx

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

apps/dashboard/src/app/(dashboard)/(chain)/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ const chainMetaRecord = {
692692
backgroundImageUrl: victionCTA.src,
693693
title:
694694
"Build, own, win, and be part of Viction World Wide Chain where everyone scales beyond limits.",
695-
buttonLink: "https://thirdweb.com/viction/popular",
695+
buttonLink: "https://thirdweb.com/viction",
696696
buttonText: "Learn More",
697697
},
698698
},
@@ -705,7 +705,7 @@ const chainMetaRecord = {
705705
backgroundImageUrl: victionCTA.src,
706706
title:
707707
"Build, own, win, and be part of Viction World Wide Chain where everyone scales beyond limits.",
708-
buttonLink: "https://thirdweb.com/viction/popular",
708+
buttonLink: "https://thirdweb.com/viction",
709709
buttonText: "Learn More",
710710
},
711711
},

apps/dashboard/src/app/(dashboard)/trending/components/pagination.client.tsx

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

apps/dashboard/src/app/(dashboard)/trending/components/sorting-header.client.tsx

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

0 commit comments

Comments
 (0)