how do i get the id of a e.g user in a pararell route?
i was trying to do something like this:
'use client'
import { ModalParallel } from '@/components/modal-parallel'
import { EditarUsuarioForm } from '@/components/usuarios/editar'
export default function Page({ params }: { params: { id: string } }) {
const id = params.id
return (
<ModalParallel size="lg">
{({ setIsOpen }) => <EditarUsuarioForm setIsOpen={setIsOpen} cancelButton id={id} />}
</ModalParallel>
)
}
but im getting this error:
Console Error
A param property was accessed directly with `params.id`. `params` is now a Promise and should be unwrapped with `React.use()` before accessing properties of the underlying params object. In this version of Next.js direct access to param properties is still supported to facilitate migration but in a future version you will be required to unwrap `params` with `React.use()`.
src/app/(app)/gestao/usuarios/@modal/[id]/editar/page.tsx (6:38) @ Page
4 | import { EditarUsuarioForm } from '@/components/usuarios/editar'
5 |
> 6 | export default function Page({ params }: { params: { id: string } }) {
| ^
7 | const id = params.id
8 | return (
9 | <ModalParallel size="lg">