mirror of
https://github.com/supabase/supabase.git
synced 2026-05-10 02:39:56 -04:00
23c827bdda
- consolidate `top level menu` and `contextual menu` into nested menu on mobile - remove legacy mobile submenu
14 lines
460 B
TypeScript
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/')
|
|
}
|