message: Avoid mutating root collections order
diff: import React from "react";
  import { Route, Switch, useLocation } from "react-router-dom";
  -import "firebase/analytics";
  -import "firebase/auth";
  -import "firebase/storage";
  -import "firebase/firestore";
  import { EntityCollection } from "./models";
  import { addInitialSlash, buildCollectionPath } from "./routes/navigation";
  import { CMSView } from "./CMSAppProps";
  @@ -18,11 +14,9 @@ export function CMSRouterSwitch({ collections, views }: {
  const location: any = useLocation();
  const mainLocation = location.state && location.state["main_location"] ? location.state["main_location"] : location;
  - const firstCollectionPath = buildCollectionPath(collections[0]);
  -
  return (
  <Switch location={mainLocation}>
  - {collections
  + {[...collections]
  // we reorder collections so that nested paths are included first
  .sort((a, b) => b.relativePath.length - a.relativePath.length)
  .map(entityCollection => (
  