How to protected routes on the client side in Nextjs when user login without admin role

后端 未结 0 1112
醉梦人生
醉梦人生 2021-01-30 12:56

Now, I have user info into Context. My problem is that it still accesses the admin page for 1-2 seconds before being redirected to the login page.

I\'ve checked role of u

相关标签:
回答
  • 消灭零回复
提交回复
热议问题