Skip to content

Commit fe46e81

Browse files
committed
[TOOL-4248] Dashboard: Fix explore category page not showing contract cards (#6829)
<!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on updating the `ExploreCategoryPage` component in the `page.tsx` file to utilize a new client obtained from `getThirdwebClient` instead of passing it as a prop. This change simplifies the component's props and enhances its internal logic. ### Detailed summary - Removed the `client` prop from `ExploreCategoryPageProps`. - Introduced `const client = getThirdwebClient(undefined);` to obtain the client internally. - Updated the `client` prop of the `ContractCard` component to use the newly defined `client` variable instead of `props.client`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 525e603 commit fe46e81

File tree

1 file changed

+4
-3
lines changed
  • apps/dashboard/src/app/(app)/(dashboard)/explore/[category]

1 file changed

+4
-3
lines changed

apps/dashboard/src/app/(app)/(dashboard)/explore/[category]/page.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
BreadcrumbPage,
77
BreadcrumbSeparator,
88
} from "@/components/ui/breadcrumb";
9+
import { getThirdwebClient } from "@/constants/thirdweb.server";
910
import {
1011
ContractCard,
1112
ContractCardSkeleton,
@@ -16,13 +17,11 @@ import type { Metadata } from "next";
1617
import Link from "next/link";
1718
import { notFound } from "next/navigation";
1819
import { Suspense } from "react";
19-
import type { ThirdwebClient } from "thirdweb";
2020

2121
type ExploreCategoryPageProps = {
2222
params: Promise<{
2323
category: string;
2424
}>;
25-
client: ThirdwebClient;
2625
};
2726

2827
export async function generateMetadata(
@@ -47,6 +46,7 @@ export default async function ExploreCategoryPage(
4746
if (!category) {
4847
notFound();
4948
}
49+
const client = getThirdwebClient(undefined);
5050

5151
return (
5252
<div className="flex flex-col">
@@ -94,6 +94,7 @@ export default async function ExploreCategoryPage(
9494
const overrides = Array.isArray(publishedContractId)
9595
? publishedContractId[2]
9696
: undefined;
97+
9798
if (!publisher || !contractId) {
9899
return null;
99100
}
@@ -104,7 +105,7 @@ export default async function ExploreCategoryPage(
104105
key={publisher + contractId + overrides?.title}
105106
>
106107
<ContractCard
107-
client={props.client}
108+
client={client}
108109
publisher={publisher}
109110
contractId={contractId}
110111
titleOverride={overrides?.title}

0 commit comments

Comments
 (0)