(path: string)
| 91 | })); |
| 92 | |
| 93 | const firstPathSegment = (path: string): string | null => { |
| 94 | const pathname = path.split(/[?#]/, 1)[0] ?? ""; |
| 95 | const segment = pathname.split("/")[1]; |
| 96 | return segment && isValidOrgSlug(segment) ? segment : null; |
| 97 | }; |
| 98 | |
| 99 | const requestedOrgSelectorFromReturnTo = (returnTo: string): string | null => |
| 100 | firstPathSegment(returnTo); |
no test coverage detected