Filter routes returned by useRouter().getRoutes()
Hey,
useRouter().getRoutes()
seems to always return all routes. My goal is to not expose the existence of routes to clients that do not have access to these routes (e.g. admin routes).
Of course I could .filter()
the routes, but it would still be possible to get the unfiltered array, if one wanted to.
Is there any way to achieve this?2 Replies
no, you can't
I mean, it is visible in the JS files anyway
hmm alright, unlucky, thanks for your answer though :)