In app router, server component, how can I get the current url (similar of window.location) #63587
-
|
Im using App router. GPT offered me to try |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
|
For more, here |
Beta Was this translation helpful? Give feedback.
-
|
It is not a rest api handler, so I don't have a request. |
Beta Was this translation helpful? Give feedback.
request.nextUrl.pathname;For more, here