Would it make sense to add an absoluteUrl
to usePage
/PageProps
? How would I do this myself?
#1505
Unanswered
simensen
asked this question in
Help (React)
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using ziggy/named routes to create URLs for my sidebar navigation. The default behavior is to create an absolute URL. This means that if I compare the
href
and the current page's URL (viausePage
), the incoming value is a complete URL.I either need to parse the absolute URL to get the path portion or create an absolute URL for the current page's URL.
I'm curious if it is possible to add
absoluteUrl
toPageProps
so that I could do the following:The navigation in my layout:
My navigation link:
If I could get a pointer on where I could make this change myself, I could send a PR for it. If anyone has a suggestion for how I could do this on my own (without needing to patch core and/or react packages) that would be nice, too. :)
Beta Was this translation helpful? Give feedback.
All reactions