Redirect issue with getserversideprops #13871
Unanswered
horlaarsco
asked this question in
Help
Replies: 2 comments 6 replies
-
From your question, I'm not entirely sure what you mean, but the first problem I notice in your screenshot is that you are using https://nextjs.org/docs/basic-features/data-fetching#only-allowed-in-a-page-2 If you take a look in the docs here, you will notice it says it can only be exported from a page file, so that's the first thing I would update in your example. |
Beta Was this translation helpful? Give feedback.
6 replies
-
Opened a RFC here: #14890 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to redirect in login page to the home page when the cookie that verifies authentication is found. when I use getserversideprops... Page redirects on first load but when i hit refresh of the login page again i get error of header sent.. screenshot below.
Beta Was this translation helpful? Give feedback.
All reactions