I have two pages. Both of them has this code on them:
export default async function Page({ params }: { params: { page: number } }) {
return (
<>
</>
)
}
They’re organized in the following file structure:
/reminders/
/done/
[page]
page.tsx
/undone/
[page]
page.tsx
When I use the navigation arrows of the browser to go to one another, I get the following error:
Error: async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding 'use client'
to a module that was originally written for the server.
I’m using Next.js 14.2.4.
I created anotehr file structure like that, with literally the same code on the pages, like this:
/test/
/one/
[page]
page.tsx
/two/
[page]
page.tsx
And I don’t get that error when I navigate to one another.
What could this possibly be? It makes no sense.