I am working with Nextjs v15. I am creating an application which have some dynamic routes because they are routes depending on usernames (the app is Telegram mini app) and new users can be added in each moment. In my dev environment everything works correctly but when I deploy to Vercel, I cannot access to this route. It doesn´t work.
I saw Vercel runtime logs and I didn´t see relevante. It seems to make a GET request to obtain the route and it returns 200 state, but it doesn´t show the route in the app, it shows the content of the / directory.
An important consideration is that If I remove the cookies, it works fine, it shows correctly the username value.
The route path must be the following: /wallet/[username]/sell
This is the code for the page. I think problem is related to the use of cookies, but I think I am using correctly.
Any help will be really useful. Thanks!
interface PageProps {
params: Promise<{ username: string }>
}
async function SellPage({ params }: PageProps) {
const { username } = await params
const cookiesStore = await cookies()
const sellStep: string = (cookiesStore).get('sellStep')?.value ?? '1'
return (
<section className={style.main}>
<h1>Sell: {sellStep}</h1>
<h3>{username}</h3>
</section>
)
}