7911aculton
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?4 replies