Skip to content

Commit e73e821

Browse files
authored
Update to Next 15 stable (#888)
1 parent 1011f2f commit e73e821

File tree

12 files changed

+2775
-2353
lines changed

12 files changed

+2775
-2353
lines changed

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

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

9-
export default async function Page({
10-
searchParams,
11-
}: {
12-
searchParams?: {
9+
export default async function Page(props: {
10+
searchParams?: Promise<{
1311
query?: string;
1412
page?: string;
15-
};
13+
}>;
1614
}) {
15+
const searchParams = await props.searchParams;
1716
const query = searchParams?.query || '';
1817

1918
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: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,13 @@ export const metadata: Metadata = {
1212
title: 'Invoices',
1313
};
1414

15-
export default async function Page({
16-
searchParams,
17-
}: {
18-
searchParams?: {
15+
export default async function Page(props: {
16+
searchParams?: Promise<{
1917
query?: string;
2018
page?: string;
21-
};
19+
}>;
2220
}) {
21+
const searchParams = await props.searchParams;
2322
const query = searchParams?.query || '';
2423
const currentPage = Number(searchParams?.page) || 1;
2524

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": "latest",
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:types-react@19.0.0-rc.1",
29+
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
3030
},
31-
"engines": {
32-
"node": ">=20.12.0"
31+
"pnpm": {
32+
"overrides": {
33+
"@types/react": "npm:types-react@19.0.0-rc.1",
34+
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
35+
}
3336
}
3437
}

0 commit comments

Comments
 (0)