Files
supabase/apps/studio/components/layouts/OrganizationLayout/OrganizationLayout.utils.ts
Francesco Sansalvadore 23c827bdda feat: nested mobile nav menu (#43333)
- consolidate `top level menu` and `contextual menu` into nested menu on
mobile
- remove legacy mobile submenu
2026-03-11 13:55:20 +01:00

14 lines
460 B
TypeScript

export function getPathnameWithoutQuery(asPath?: string, fallback?: string): string {
const path = asPath ?? fallback ?? ''
if (typeof path !== 'string' || path.length === 0) return ''
const withoutQuery = path.split('?')[0]
return withoutQuery ?? path
}
export function isOrgMenuScope(pathname: string): boolean {
if (!pathname || typeof pathname !== 'string') return false
const trimmed = pathname.trim()
return trimmed.startsWith('/org/')
}