(path: string)
| 98 | })); |
| 99 | |
| 100 | const firstPathSegment = (path: string): string | null => { |
| 101 | const pathname = path.split(/[?#]/, 1)[0] ?? ""; |
| 102 | const segment = pathname.split("/")[1]; |
| 103 | return segment && isValidOrgSlug(segment) ? segment : null; |
| 104 | }; |
| 105 | |
| 106 | const requestedOrgSelectorFromReturnTo = (returnTo: string): string | null => |
| 107 | firstPathSegment(returnTo); |
no test coverage detected