Skip to content

Commit 9e005a7

Browse files
committed
chore: update nextjs
1 parent 3639f73 commit 9e005a7

File tree

11 files changed

+472
-146
lines changed

11 files changed

+472
-146
lines changed

package.json

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
"class-variance-authority": "^0.7.1",
1919
"clsx": "^2.1.1",
2020
"lucide-react": "^0.475.0",
21-
"next": "14",
21+
"next": "15.3.3",
2222
"next-intl": "^3.26.3",
23-
"react": "^18",
24-
"react-dom": "^18",
23+
"react": "19.1.0",
24+
"react-dom": "19.1.0",
2525
"rtl-detect": "^1.1.2",
2626
"tailwind-merge": "^2.5.5",
2727
"tailwindcss-animate": "^1.0.7",
@@ -30,8 +30,8 @@
3030
"devDependencies": {
3131
"@biomejs/biome": "1.9.4",
3232
"@types/node": "^22",
33-
"@types/react": "^18",
34-
"@types/react-dom": "^18",
33+
"@types/react": "19.1.6",
34+
"@types/react-dom": "19.1.5",
3535
"@types/rtl-detect": "^1",
3636
"husky": "^9.1.7",
3737
"lint-staged": "^15.2.10",
@@ -42,5 +42,9 @@
4242
"volta": {
4343
"node": "20.18.1"
4444
},
45-
"packageManager": "yarn@4.5.3"
45+
"packageManager": "yarn@4.5.3",
46+
"resolutions": {
47+
"@types/react": "19.1.6",
48+
"@types/react-dom": "19.1.5"
49+
}
4650
}

src/app/[locale]/case/[disputeId]/components/Evidence.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ interface IEvidence {
1414
}
1515

1616
const Evidence: React.FC<IEvidence> = async ({ evidenceGroupId }) => {
17-
const headersList = headers();
17+
const headersList = await headers();
1818
const host = headersList.get("host");
1919
const protocol = headersList.get("x-forwarded-proto");
2020

src/app/[locale]/case/[disputeId]/components/Question.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ interface IQuestion {
1717
}
1818

1919
const Question: React.FC<IQuestion> = async ({ disputeId }) => {
20-
const headersList = headers();
20+
const headersList = await headers();
2121
const host = headersList.get("host");
2222
const protocol = headersList.get("x-forwarded-proto");
2323

src/app/[locale]/case/[disputeId]/components/Votes.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type IJurorData = Record<
2424
>;
2525

2626
const Votes: React.FC<IVotes> = async ({ disputeId }) => {
27-
const headersList = headers();
27+
const headersList = await headers();
2828
const host = headersList.get("host");
2929
const protocol = headersList.get("x-forwarded-proto");
3030

src/app/[locale]/case/[disputeId]/page.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ import Votes from "./components/Votes";
1414
import { Periods } from "@/app/utils";
1515

1616
interface ICaseDetails {
17-
params: { disputeId: `${number}` };
17+
params: Promise<{ disputeId: `${number}` }>;
1818
}
1919

20-
const CaseDetails: React.FC<ICaseDetails> = async ({
21-
params: { disputeId },
22-
}) => {
23-
const headersList = headers();
20+
const CaseDetails: React.FC<ICaseDetails> = async (props) => {
21+
const params = await props.params;
22+
23+
const { disputeId } = params;
24+
25+
const headersList = await headers();
2426
const host = headersList.get("host");
2527
const protocol = headersList.get("x-forwarded-proto");
2628

src/app/[locale]/layout.tsx

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,18 @@ export const metadata: Metadata = {
1919
description: "Kleros archival UI",
2020
};
2121

22-
export default async function RootLayout({
23-
children,
24-
params: { locale },
25-
}: Readonly<{
26-
children: React.ReactNode;
27-
params: { locale: string };
28-
}>) {
22+
export default async function RootLayout(
23+
props: Readonly<{
24+
children: React.ReactNode;
25+
params: Promise<{ locale: string }>;
26+
}>,
27+
) {
28+
const params = await props.params;
29+
30+
const { locale } = params;
31+
32+
const { children } = props;
33+
2934
const messages = await getMessages({ locale });
3035
const langDir = getLangDir(locale);
3136

src/app/api/dispute/[id]/status/route.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
export const dynamic = "force-dynamic";
2-
31
import { NextRequest, NextResponse } from "next/server";
42

53
import { fetchStatus } from "./query";

src/app/api/dispute/[id]/template/route.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
export const dynamic = "force-dynamic";
2-
31
import { NextRequest, NextResponse } from "next/server";
42

53
import { getDispute } from "@kleros/kleros-sdk";

src/app/api/dispute/[id]/votes/route.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
export const dynamic = "force-dynamic";
2-
31
import { NextRequest, NextResponse } from "next/server";
42

53
import { fetchVotes } from "./query";

tsconfig.json

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
22
"compilerOptions": {
3-
"lib": ["dom", "dom.iterable", "esnext"],
3+
"lib": [
4+
"dom",
5+
"dom.iterable",
6+
"esnext"
7+
],
48
"allowJs": true,
59
"skipLibCheck": true,
610
"strict": true,
@@ -18,9 +22,19 @@
1822
}
1923
],
2024
"paths": {
21-
"@/*": ["./src/*"]
22-
}
25+
"@/*": [
26+
"./src/*"
27+
]
28+
},
29+
"target": "ES2017"
2330
},
24-
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
25-
"exclude": ["node_modules"]
31+
"include": [
32+
"next-env.d.ts",
33+
"**/*.ts",
34+
"**/*.tsx",
35+
".next/types/**/*.ts"
36+
],
37+
"exclude": [
38+
"node_modules"
39+
]
2640
}

0 commit comments

Comments
 (0)