Relative Content

Tag Archive for next.js

Redirection based on fetched data from Firestore in Next Js App

So I have this use case, where in the NextJS app, I fetch the user info, and then redirect based on the user info, if the info is found, app will be redirected to /home page else it will be redirected to /profile page. Whats the appropriate way to enforce this redirection? Middlewares? Server side props?

Next Js – `params` should be awaited before using its properties

Kind of losing my mind on this one. In my Next Js app I keep hitting this error of Error: Route "/api/materials/[materialId]" used params.materialId. params should be awaited before using its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis