Update to Next 15 stable (#888)

This commit is contained in:
Lee Robinson
2024-10-21 17:17:11 -05:00
committed by GitHub
parent 1011f2f19f
commit e73e821f30
12 changed files with 2749 additions and 2327 deletions

View File

@@ -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);

View File

@@ -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),

View File

@@ -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;

View File

@@ -1,5 +0,0 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
export default nextConfig;

View File

@@ -0,0 +1,7 @@
import type { NextConfig } from 'next';
const nextConfig: NextConfig = {
/* config options here */
};
export default nextConfig;

View File

@@ -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"
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -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" />

View File

@@ -1,5 +0,0 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
export default nextConfig;

View File

@@ -0,0 +1,7 @@
import type { NextConfig } from 'next';
const nextConfig: NextConfig = {
/* config options here */
};
export default nextConfig;

View File

@@ -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"
}
}
}

File diff suppressed because it is too large Load Diff