export function isProductRoot()

in src/utils/getLocalDirectory.ts [13:30]


export function isProductRoot(pathname: string): boolean {
  const path = pathname.split("/");

  if (directory[path[1]]?.productRoot?.route === pathname) {
    // matches /ui, for example
    return true;
  }
  if (path[2] === "q") {
    // matches /ui/q/framework/react, for example
    return true;
  }

  if (path[2]?.startsWith(`#`)) {
    // matches /cli/#key-capabilities, for examle
    return true;
  }
  return false;
}