mirror of
https://github.com/supabase/supabase.git
synced 2026-12-06 00:19:08 +00:00
## Context Some minor UI issues that I found while reviewing another PR - Fix `NoProjectsOnPaidOrgInfo` prematurely showing while project details is still loading <img width="1249" height="376" alt="image" src="https://github.com/user-attachments/assets/3f41f4a3-849f-4685-bcc4-6fed3b433042" /> - Fix padding alignment for Organization details form group <img width="1115" height="282" alt="image" src="https://github.com/user-attachments/assets/c0865614-208c-4335-87d3-176c4411b6a4" /> - Fix projects list on `/org/[slug]` showing stale projects while switching orgs - just removed `keepPreviousData` so that the card loaders shows up - Fix organization settings in sidebar menu not showing active state while on certain settings pages like audit-log-drains, webhooks, etc
26 lines
645 B
TypeScript
26 lines
645 B
TypeScript
export const ORG_SETTINGS_ROUTES: readonly string[] = [
|
|
'general',
|
|
'security',
|
|
'sso',
|
|
'apps',
|
|
'private-apps',
|
|
'webhooks',
|
|
'audit',
|
|
'audit-log-drains',
|
|
'documents',
|
|
]
|
|
|
|
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/')
|
|
}
|