Skip to content

Commit 520f7c3

Browse files
committed
Update to Next 15 latest
1 parent 1011f2f commit 520f7c3

File tree

11 files changed

+2784
-2358
lines changed

11 files changed

+2784
-2358
lines changed

dashboard/final-example/app/dashboard/customers/page.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ export const metadata: Metadata = {
66
title: 'Customers',
77
};
88

9-
export default async function Page({
10-
searchParams,
11-
}: {
12-
searchParams?: {
13-
query?: string;
14-
page?: string;
15-
};
16-
}) {
9+
export default async function Page(
10+
props: {
11+
searchParams?: Promise<{
12+
query?: string;
13+
page?: string;
14+
}>;
15+
}
16+
) {
17+
const searchParams = await props.searchParams;
1718
const query = searchParams?.query || '';
1819

1920
const customers = await fetchFilteredCustomers(query);

dashboard/final-example/app/dashboard/invoices/[id]/edit/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ export const metadata: Metadata = {
88
title: 'Edit Invoice',
99
};
1010

11-
export default async function Page({ params }: { params: { id: string } }) {
11+
export default async function Page(props: { params: Promise<{ id: string }> }) {
12+
const params = await props.params;
1213
const id = params.id;
1314
const [invoice, customers] = await Promise.all([
1415
fetchInvoiceById(id),

dashboard/final-example/app/dashboard/invoices/page.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ export const metadata: Metadata = {
1212
title: 'Invoices',
1313
};
1414

15-
export default async function Page({
16-
searchParams,
17-
}: {
18-
searchParams?: {
19-
query?: string;
20-
page?: string;
21-
};
22-
}) {
15+
export default async function Page(
16+
props: {
17+
searchParams?: Promise<{
18+
query?: string;
19+
page?: string;
20+
}>;
21+
}
22+
) {
23+
const searchParams = await props.searchParams;
2324
const query = searchParams?.query || '';
2425
const currentPage = Number(searchParams?.page) || 1;
2526

dashboard/final-example/next.config.mjs

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import type { NextConfig } from 'next';
2+
3+
const nextConfig: NextConfig = {
4+
/* config options here */
5+
};
6+
7+
export default nextConfig;

dashboard/final-example/package.json

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"private": true,
33
"scripts": {
44
"build": "next build",
5-
"dev": "next dev",
5+
"dev": "next dev --turbo",
66
"start": "next start"
77
},
88
"dependencies": {
@@ -12,11 +12,11 @@
1212
"autoprefixer": "10.4.19",
1313
"bcrypt": "^5.1.1",
1414
"clsx": "^2.1.1",
15-
"next": "15.0.0-canary.56",
15+
"next": "15.0.0-rc.1",
1616
"next-auth": "5.0.0-beta.19",
1717
"postcss": "8.4.38",
18-
"react": "19.0.0-rc-f38c22b244-20240704",
19-
"react-dom": "19.0.0-rc-f38c22b244-20240704",
18+
"react": "19.0.0-rc-cd22717c-20241013",
19+
"react-dom": "19.0.0-rc-cd22717c-20241013",
2020
"tailwindcss": "3.4.4",
2121
"typescript": "5.5.2",
2222
"use-debounce": "^10.0.1",
@@ -25,10 +25,13 @@
2525
"devDependencies": {
2626
"@types/bcrypt": "^5.0.2",
2727
"@types/node": "20.14.8",
28-
"@types/react": "18.3.3",
29-
"@types/react-dom": "18.3.0"
28+
"@types/react": "npm:[email protected]",
29+
"@types/react-dom": "npm:[email protected]"
3030
},
31-
"engines": {
32-
"node": ">=20.12.0"
31+
"pnpm": {
32+
"overrides": {
33+
"@types/react": "npm:[email protected]",
34+
"@types/react-dom": "npm:[email protected]"
35+
}
3336
}
3437
}

0 commit comments

Comments
 (0)