Skip to content

Commit fdce789

Browse files
committed
Dashboard: Fix explore category page not undefined client
1 parent 4baefa5 commit fdce789

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

+4-3
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)