Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions dashboard/final-example/app/dashboard/customers/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ export const metadata: Metadata = {
title: 'Customers',
};

export default async function Page({
searchParams,
}: {
searchParams?: {
query?: string;
page?: string;
};
}) {
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
17 changes: 9 additions & 8 deletions dashboard/final-example/app/dashboard/invoices/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ export const metadata: Metadata = {
title: 'Invoices',
};

export default async function Page({
searchParams,
}: {
searchParams?: {
query?: string;
page?: string;
};
}) {
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;

Expand Down
5 changes: 0 additions & 5 deletions dashboard/final-example/next.config.mjs

This file was deleted.

7 changes: 7 additions & 0 deletions dashboard/final-example/next.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import type { NextConfig } from 'next';

const nextConfig: NextConfig = {
/* config options here */
};

export default nextConfig;
19 changes: 11 additions & 8 deletions dashboard/final-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"private": true,
"scripts": {
"build": "next build",
"dev": "next dev",
"dev": "next dev --turbo",
"start": "next start"
},
"dependencies": {
Expand All @@ -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",
Expand All @@ -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:[email protected]",
"@types/react-dom": "npm:[email protected]"
},
"engines": {
"node": ">=20.12.0"
"pnpm": {
"overrides": {
"@types/react": "npm:[email protected]",
"@types/react-dom": "npm:[email protected]"
}
}
}
Loading
Loading