(pathname: string)
| 147 | /** The page a slashed v2 page (`/pricing/`) canonicalizes to (`/pricing`), |
| 148 | * or `null`. Deeper paths (`/pricing/extra`) stay with v1. */ |
| 149 | export const v2PageForSlashedPath = (pathname: string): string | null => { |
| 150 | if (!pathname.endsWith("/")) return null; |
| 151 | const page = pathname.slice(0, -1); |
| 152 | return V2_EXACT_PAGES.has(page) ? page : null; |
| 153 | }; |
| 154 | |
| 155 | /** v2's dashboard pages are `/org/<slug>/...` on v2's app host. `org` is a |
| 156 | * reserved v1 slug and v1's own `/org` page has nothing below it, so |
no outgoing calls
no test coverage detected