message: used regex instead of slice
diff: @@ -35,8 +35,8 @@ export function useSelectedSubRoute(subRoutes: SubRoute[]): {
  // TODO: remove once react-router updated
  const sortedRoutes = routes.sort((a, b) =>
  - // remove added "/*" symbols from path before comparing
  - b.path.slice(0, -2).localeCompare(a.path.slice(0, -2)),
  + // remove "/*" symbols from path end before comparing
  + b.path.replace(/\/\*$/, '').localeCompare(a.path.replace(/\/\*$/, '')),
  );
  const element = useRoutes(sortedRoutes) ?? subRoutes[0].children;
  