Can someone please help me with this error? THANKS!
Vercel:
Type error: Type ‘{ searchParams?: { query?: string | undefined; page?: string | undefined; } | undefined; }’ does not satisfy the constraint ‘PageProps’.
MS Code:
In route /dashboard/invoices a searchParam property was accessed directly with searchParams.query. searchParams should be awaited before accessing properties. Learn more: Dynamic APIs are Asynchronous | Next.js
Source:
`import Pagination from “@/app/ui/invoices/pagination”
import Search from “@/app/ui/search”
import Table from “@/app/ui/invoices/table”
import { CreateInvoice } from “@/app/ui/invoices/buttons”
import { lusitana } from “@/app/ui/fonts”
import { InvoicesTableSkeleton } from “@/app/ui/skeletons”
import { Suspense } from “react”
import { fetchInvoicesPages } from “@/app/lib/data”
Hello and welcome to the community, @dwa-github! Based on the error and the code you shared, I’m guessing this project uses Next.js 15. Instead, I recommend using the latest version of Next.js 14 for that learning course.