Skip to content

Commit 297ed64

Browse files
committed
next15
1 parent 9fadbcc commit 297ed64

File tree

152 files changed

+2030
-1844
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+2030
-1844
lines changed

apps/dashboard/package.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
"@tanstack/react-query": "5.59.16",
5454
"@tanstack/react-table": "^8.17.3",
5555
"@thirdweb-dev/service-utils": "workspace:*",
56+
"@vercel/functions": "^1.4.2",
5657
"@vercel/og": "^0.6.2",
5758
"abitype": "1.0.6",
5859
"chakra-react-select": "^4.7.6",
@@ -69,7 +70,7 @@
6970
"ipaddr.js": "^2.2.0",
7071
"lottie-react": "^2.4.0",
7172
"lucide-react": "0.453.0",
72-
"next": "14.2.15",
73+
"next": "15.0.1",
7374
"next-plausible": "^3.12.0",
7475
"next-seo": "^6.5.0",
7576
"next-themes": "^0.3.0",
@@ -80,10 +81,10 @@
8081
"prism-react-renderer": "^2.3.1",
8182
"prismjs": "^1.29.0",
8283
"qrcode": "^1.5.3",
83-
"react": "18.3.1",
84+
"react": "19.0.0-rc-69d4b800-20241021",
8485
"react-children-utilities": "^2.10.0",
8586
"react-day-picker": "^8.10.1",
86-
"react-dom": "18.3.1",
87+
"react-dom": "19.0.0-rc-69d4b800-20241021",
8788
"react-dropzone": "^14.2.9",
8889
"react-error-boundary": "^4.1.2",
8990
"react-hook-form": "7.52.0",
@@ -106,8 +107,8 @@
106107
"devDependencies": {
107108
"@chakra-ui/cli": "^2.4.1",
108109
"@chromatic-com/storybook": "2.0.2",
109-
"@next/bundle-analyzer": "14.2.15",
110-
"@next/eslint-plugin-next": "14.2.15",
110+
"@next/bundle-analyzer": "15.0.1",
111+
"@next/eslint-plugin-next": "15.0.1",
111112
"@playwright/test": "1.47.2",
112113
"@storybook/addon-essentials": "8.3.6",
113114
"@storybook/addon-interactions": "8.3.6",
@@ -123,8 +124,8 @@
123124
"@types/papaparse": "^5.3.15",
124125
"@types/pluralize": "^0.0.33",
125126
"@types/qrcode": "^1.5.5",
126-
"@types/react": "^18.3.11",
127-
"@types/react-dom": "^18.3.1",
127+
"@types/react": "npm:[email protected]",
128+
"@types/react-dom": "npm:[email protected].1",
128129
"@types/react-table": "^7.7.20",
129130
"@types/spdx-correct": "^3.1.3",
130131
"@types/swagger-ui-react": "^4.18.3",
@@ -134,7 +135,7 @@
134135
"checkly": "^4.8.1",
135136
"eslint": "8.57.0",
136137
"eslint-config-biome": "1.9.3",
137-
"eslint-plugin-react-compiler": "0.0.0-experimental-fa06e2c-20241014",
138+
"eslint-plugin-react-compiler": "19.0.0-beta-8a03594-20241020",
138139
"eslint-plugin-storybook": "^0.9.0",
139140
"knip": "^5.33.3",
140141
"next-sitemap": "^4.2.3",

apps/dashboard/src/@/api/projects.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export type Project = {
2121
};
2222

2323
export async function getProjects(teamSlug: string) {
24-
const cookiesManager = cookies();
24+
const cookiesManager = await cookies();
2525
const activeAccount = cookiesManager.get(COOKIE_ACTIVE_ACCOUNT)?.value;
2626
const token = activeAccount
2727
? cookiesManager.get(COOKIE_PREFIX_TOKEN + activeAccount)?.value
@@ -46,7 +46,7 @@ export async function getProjects(teamSlug: string) {
4646
}
4747

4848
export async function getProject(teamSlug: string, projectSlug: string) {
49-
const cookiesManager = cookies();
49+
const cookiesManager = await cookies();
5050
const activeAccount = cookiesManager.get(COOKIE_ACTIVE_ACCOUNT)?.value;
5151
const token = activeAccount
5252
? cookiesManager.get(COOKIE_PREFIX_TOKEN + activeAccount)?.value

apps/dashboard/src/@/api/team.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export type Team = {
2323
};
2424

2525
export async function getTeamBySlug(slug: string) {
26-
const cookiesManager = cookies();
26+
const cookiesManager = await cookies();
2727
const activeAccount = cookiesManager.get(COOKIE_ACTIVE_ACCOUNT)?.value;
2828
const token = activeAccount
2929
? cookiesManager.get(COOKIE_PREFIX_TOKEN + activeAccount)?.value
@@ -45,7 +45,7 @@ export async function getTeamBySlug(slug: string) {
4545
}
4646

4747
export async function getTeams() {
48-
const cookiesManager = cookies();
48+
const cookiesManager = await cookies();
4949
const activeAccount = cookiesManager.get(COOKIE_ACTIVE_ACCOUNT)?.value;
5050
const token = activeAccount
5151
? cookiesManager.get(COOKIE_PREFIX_TOKEN + activeAccount)?.value
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1-
import { cookies } from "next/headers";
1+
import { type UnsafeUnwrappedCookies, cookies } from "next/headers";
22

33
export const COOKIE_ACTIVE_ACCOUNT = "tw_active_account";
44
export const COOKIE_PREFIX_TOKEN = "tw_token_";
55

66
export function getActiveAccountCookie() {
7-
return cookies().get(COOKIE_ACTIVE_ACCOUNT)?.value;
7+
return (cookies() as unknown as UnsafeUnwrappedCookies).get(
8+
COOKIE_ACTIVE_ACCOUNT,
9+
)?.value;
810
}
911

1012
export function getJWTCookie(address: string) {
11-
return cookies().get(COOKIE_PREFIX_TOKEN + address)?.value;
13+
return (cookies() as unknown as UnsafeUnwrappedCookies).get(
14+
COOKIE_PREFIX_TOKEN + address,
15+
)?.value;
1216
}

apps/dashboard/src/@3rdweb-sdk/react/components/roles/admin-only.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import {
55
import type { ThirdwebContract } from "thirdweb";
66
import type { ComponentWithChildren } from "types/component-with-children";
77

8+
import type { JSX } from "react";
9+
810
interface AdminOnlyProps {
911
contract: ThirdwebContract;
1012
failOpen?: boolean;

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

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ import { ChainHeader } from "./components/server/chain-header";
3232

3333
// TODO: improve the behavior when clicking "Get started with thirdweb", currently just redirects to the dashboard
3434

35-
export async function generateMetadata({
36-
params,
37-
}: { params: { chain_id: string } }): Promise<Metadata> {
35+
export async function generateMetadata(props: {
36+
params: Promise<{ chain_id: string }>;
37+
}): Promise<Metadata> {
38+
const params = await props.params;
3839
const chain = await getChain(params.chain_id);
3940
const sanitizedChainName = chain.name.replace("Mainnet", "").trim();
4041
const title = `${sanitizedChainName}: RPC and Chain Settings`;
@@ -54,13 +55,14 @@ export async function generateMetadata({
5455
}
5556

5657
// this is the dashboard layout file
57-
export default async function ChainPageLayout({
58-
children,
59-
params,
60-
}: {
58+
export default async function ChainPageLayout(props: {
6159
children: React.ReactNode;
62-
params: { chain_id: string };
60+
params: Promise<{ chain_id: string }>;
6361
}) {
62+
const params = await props.params;
63+
64+
const { children } = props;
65+
6466
const chain = await getChain(params.chain_id);
6567

6668
if (params.chain_id !== chain.slug) {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import { ChainCTA } from "./components/server/cta-card";
1313
import { ExplorersSection } from "./components/server/explorer-section";
1414

1515
export default async function Page(props: {
16-
params: { chain_id: string };
16+
params: Promise<{ chain_id: string }>;
1717
}) {
18-
const chain = await getChain(props.params.chain_id);
18+
const chain = await getChain((await props.params).chain_id);
1919
const chainMetadata = await getChainMetadata(chain.chainId);
2020
const isDeprecated = chain.status === "deprecated";
2121

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

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ import { getChain } from "../../../utils";
77
export const dynamic = "force-dynamic";
88

99
export default async function Page(props: {
10-
params: { chain_id: string };
11-
searchParams: { page?: number; sortBy?: SortBy };
10+
params: Promise<{ chain_id: string }>;
11+
searchParams: Promise<{ page?: number; sortBy?: SortBy }>;
1212
}) {
13-
const chain = await getChain(props.params.chain_id);
13+
const chain = await getChain((await props.params).chain_id);
1414
const topContracts = await fetchTopContracts({
1515
chainId: chain.chainId,
16-
page: props.searchParams.page,
17-
sortBy: props.searchParams.sortBy,
16+
page: (await props.searchParams).page,
17+
sortBy: (await props.searchParams).sortBy,
1818
perPage: 15,
1919
timeRange: "month",
2020
});
@@ -24,22 +24,18 @@ export default async function Page(props: {
2424
<h2 className="mb-2 font-semibold text-2xl tracking-tighter">
2525
Popular Contracts
2626
</h2>
27-
2827
<p className="text-muted-foreground text-sm">
2928
Explore contracts on Ethereum and sort them by your preferred metrics
3029
</p>
31-
3230
<div className="h-8" />
33-
3431
{topContracts.length > 0 && (
3532
<TrendingContractSection
3633
topContracts={topContracts}
3734
chainId={chain.chainId}
38-
searchParams={props.searchParams}
35+
searchParams={await props.searchParams}
3936
showPagination={true}
4037
/>
4138
)}
42-
4339
{topContracts.length === 0 && (
4440
<div className="flex h-[200px] items-center justify-center rounded-lg border border-border text-lg text-muted-foreground">
4541
<div className="flex items-center gap-2">

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/direct-listings/page.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import { getContractPageMetadata } from "../../_utils/getContractPageMetadata";
44
import { ContractDirectListingsPage } from "./ContractDirectListingsPage";
55

66
export default async function Page(props: {
7-
params: {
7+
params: Promise<{
88
contractAddress: string;
99
chain_id: string;
10-
};
10+
}>;
1111
}) {
12-
const info = await getContractPageParamsInfo(props.params);
12+
const info = await getContractPageParamsInfo(await props.params);
1313

1414
if (!info) {
1515
notFound();
@@ -20,7 +20,9 @@ export default async function Page(props: {
2020
);
2121

2222
if (!isDirectListingSupported) {
23-
redirect(`/${props.params.chain_id}/${props.params.contractAddress}`);
23+
redirect(
24+
`/${(await props.params).chain_id}/${(await props.params).contractAddress}`,
25+
);
2426
}
2527

2628
return <ContractDirectListingsPage contract={info.contract} />;

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/english-auctions/page.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import { getContractPageMetadata } from "../../_utils/getContractPageMetadata";
44
import { ContractEnglishAuctionsPage } from "./ContractEnglishAuctionsPage";
55

66
export default async function Page(props: {
7-
params: {
7+
params: Promise<{
88
contractAddress: string;
99
chain_id: string;
10-
};
10+
}>;
1111
}) {
12-
const info = await getContractPageParamsInfo(props.params);
12+
const info = await getContractPageParamsInfo(await props.params);
1313

1414
if (!info) {
1515
notFound();
@@ -20,7 +20,9 @@ export default async function Page(props: {
2020
);
2121

2222
if (!isEnglishAuctionSupported) {
23-
redirect(`/${props.params.chain_id}/${props.params.contractAddress}`);
23+
redirect(
24+
`/${(await props.params).chain_id}/${(await props.params).contractAddress}`,
25+
);
2426
}
2527

2628
return <ContractEnglishAuctionsPage contract={info.contract} />;

0 commit comments

Comments
 (0)