Disable route link #4219
Unanswered
DjordyKoert
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We have a page which displays various links the user can navigate to, but it may happen that a user does not have the required permissions to actually view that page.
Navigation to the page can be mitigated by adding a
beforeLoad
and utilizing theredirect
function as described here, but we would also like to show the user before navigating (before the link is pressed) if the route is even allowed to be navigated to (by either conditionally rendering or disabling it).Now my question is: How can we do this & is it currently possible to do this?
The documentation only states how we can create a protected route when the user is already attempting to navigate to a route, but not how we can disable the link that would supposedly navigate to said route.
Beta Was this translation helpful? Give feedback.
All reactions