Users that have not logged in should not be allowed to access the dashboard page as it can result it in hazardous complications.
It seems like you have not added the middleware.ts file to your Next.js project.
I am willing to provide help for FREE. :)