OrganizationLayout.utils.ts13 lines · main
| 1 | export function getPathnameWithoutQuery(asPath?: string, fallback?: string): string { |
| 2 | const path = asPath ?? fallback ?? '' |
| 3 | if (typeof path !== 'string' || path.length === 0) return '' |
| 4 | |
| 5 | const withoutQuery = path.split('?')[0] |
| 6 | return withoutQuery ?? path |
| 7 | } |
| 8 | |
| 9 | export function isOrgMenuScope(pathname: string): boolean { |
| 10 | if (!pathname || typeof pathname !== 'string') return false |
| 11 | const trimmed = pathname.trim() |
| 12 | return trimmed.startsWith('/org/') |
| 13 | } |