mirror of
https://github.com/vercel/next-learn.git
synced 2026-06-11 09:51:47 +00:00
Update to Next 15 stable (#888)
This commit is contained in:
@@ -6,14 +6,13 @@ export const metadata: Metadata = {
|
||||
title: 'Customers',
|
||||
};
|
||||
|
||||
export default async function Page({
|
||||
searchParams,
|
||||
}: {
|
||||
searchParams?: {
|
||||
export default async function Page(props: {
|
||||
searchParams?: Promise<{
|
||||
query?: string;
|
||||
page?: string;
|
||||
};
|
||||
}>;
|
||||
}) {
|
||||
const searchParams = await props.searchParams;
|
||||
const query = searchParams?.query || '';
|
||||
|
||||
const customers = await fetchFilteredCustomers(query);
|
||||
|
||||
@@ -8,7 +8,8 @@ export const metadata: Metadata = {
|
||||
title: 'Edit Invoice',
|
||||
};
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
export default async function Page(props: { params: Promise<{ id: string }> }) {
|
||||
const params = await props.params;
|
||||
const id = params.id;
|
||||
const [invoice, customers] = await Promise.all([
|
||||
fetchInvoiceById(id),
|
||||
|
||||
@@ -12,14 +12,13 @@ export const metadata: Metadata = {
|
||||
title: 'Invoices',
|
||||
};
|
||||
|
||||
export default async function Page({
|
||||
searchParams,
|
||||
}: {
|
||||
searchParams?: {
|
||||
export default async function Page(props: {
|
||||
searchParams?: Promise<{
|
||||
query?: string;
|
||||
page?: string;
|
||||
};
|
||||
}>;
|
||||
}) {
|
||||
const searchParams = await props.searchParams;
|
||||
const query = searchParams?.query || '';
|
||||
const currentPage = Number(searchParams?.page) || 1;
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
|
||||
const nextConfig = {};
|
||||
|
||||
export default nextConfig;
|
||||
7
dashboard/final-example/next.config.ts
Normal file
7
dashboard/final-example/next.config.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import type { NextConfig } from 'next';
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
/* config options here */
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
@@ -2,7 +2,7 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "next build",
|
||||
"dev": "next dev",
|
||||
"dev": "next dev --turbo",
|
||||
"start": "next start"
|
||||
},
|
||||
"dependencies": {
|
||||
@@ -12,11 +12,11 @@
|
||||
"autoprefixer": "10.4.19",
|
||||
"bcrypt": "^5.1.1",
|
||||
"clsx": "^2.1.1",
|
||||
"next": "15.0.0-canary.56",
|
||||
"next": "latest",
|
||||
"next-auth": "5.0.0-beta.19",
|
||||
"postcss": "8.4.38",
|
||||
"react": "19.0.0-rc-f38c22b244-20240704",
|
||||
"react-dom": "19.0.0-rc-f38c22b244-20240704",
|
||||
"react": "19.0.0-rc-cd22717c-20241013",
|
||||
"react-dom": "19.0.0-rc-cd22717c-20241013",
|
||||
"tailwindcss": "3.4.4",
|
||||
"typescript": "5.5.2",
|
||||
"use-debounce": "^10.0.1",
|
||||
@@ -25,10 +25,13 @@
|
||||
"devDependencies": {
|
||||
"@types/bcrypt": "^5.0.2",
|
||||
"@types/node": "20.14.8",
|
||||
"@types/react": "18.3.3",
|
||||
"@types/react-dom": "18.3.0"
|
||||
"@types/react": "npm:types-react@19.0.0-rc.1",
|
||||
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.12.0"
|
||||
"pnpm": {
|
||||
"overrides": {
|
||||
"@types/react": "npm:types-react@19.0.0-rc.1",
|
||||
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
2413
dashboard/final-example/pnpm-lock.yaml
generated
2413
dashboard/final-example/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -34,7 +34,7 @@ export function RevenueChartSkeleton() {
|
||||
<div className={`${shimmer} relative w-full overflow-hidden md:col-span-4`}>
|
||||
<div className="mb-4 h-8 w-36 rounded-md bg-gray-100" />
|
||||
<div className="rounded-xl bg-gray-100 p-4">
|
||||
<div className="mt-0 grid h-[410px] grid-cols-12 items-end gap-2 rounded-md bg-white p-4 sm:grid-cols-13 md:gap-4" />
|
||||
<div className="sm:grid-cols-13 mt-0 grid h-[410px] grid-cols-12 items-end gap-2 rounded-md bg-white p-4 md:gap-4" />
|
||||
<div className="flex items-center pb-2 pt-6">
|
||||
<div className="h-5 w-5 rounded-full bg-gray-200" />
|
||||
<div className="ml-2 h-4 w-20 rounded-md bg-gray-200" />
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
|
||||
const nextConfig = {};
|
||||
|
||||
export default nextConfig;
|
||||
7
dashboard/starter-example/next.config.ts
Normal file
7
dashboard/starter-example/next.config.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import type { NextConfig } from 'next';
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
/* config options here */
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
@@ -2,7 +2,7 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "next build",
|
||||
"dev": "next dev",
|
||||
"dev": "next dev --turbo",
|
||||
"start": "next start"
|
||||
},
|
||||
"dependencies": {
|
||||
@@ -12,11 +12,11 @@
|
||||
"autoprefixer": "10.4.19",
|
||||
"bcrypt": "^5.1.1",
|
||||
"clsx": "^2.1.1",
|
||||
"next": "15.0.0-canary.56",
|
||||
"next": "^15.0.0",
|
||||
"next-auth": "5.0.0-beta.19",
|
||||
"postcss": "8.4.38",
|
||||
"react": "19.0.0-rc-f38c22b244-20240704",
|
||||
"react-dom": "19.0.0-rc-f38c22b244-20240704",
|
||||
"react": "19.0.0-rc-cd22717c-20241013",
|
||||
"react-dom": "19.0.0-rc-cd22717c-20241013",
|
||||
"tailwindcss": "3.4.4",
|
||||
"typescript": "5.5.2",
|
||||
"use-debounce": "^10.0.1",
|
||||
@@ -25,10 +25,13 @@
|
||||
"devDependencies": {
|
||||
"@types/bcrypt": "^5.0.2",
|
||||
"@types/node": "20.14.8",
|
||||
"@types/react": "18.3.3",
|
||||
"@types/react-dom": "18.3.0"
|
||||
"@types/react": "npm:types-react@19.0.0-rc.1",
|
||||
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.12.0"
|
||||
"pnpm": {
|
||||
"overrides": {
|
||||
"@types/react": "npm:types-react@19.0.0-rc.1",
|
||||
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
2406
dashboard/starter-example/pnpm-lock.yaml
generated
2406
dashboard/starter-example/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user