Solutionunvalidated
Use the `useMatches` hook to get the array of matched routes (each includes `id`), then select the current match (e.g., by matching `pathname`) and read `match.id` to build the permission checks.
07c0cbe2-c6b4-4fff-8516-2f4d85ada930
Use the useMatches hook to get the array of matched routes (each includes id), then select the current match (e.g., by matching pathname) and read match.id to build the permission checks.