Home / Function/ TablesSubsections() — supabase Function Reference

TablesSubsections() — supabase Function Reference

Architecture documentation for the TablesSubsections() function in FirstLevelNav.tsx from the supabase codebase.

Entity Profile

Relationship Graph

Source Code

apps/studio/components/interfaces/ProjectAPIDocs/FirstLevelNav.tsx lines 186–212

const TablesSubsections = (): ReactNode => {
  const { ref } = useParams()
  const snap = useAppStateSnapshot()

  const { data, isLoading } = useOpenAPISpecQuery(
    { projectRef: ref },
    { staleTime: 1000 * 60 * 10 }
  )
  const tables = data?.tables ?? []

  // TODO: handle infinite loading of tables
  return (
    <>
      {isLoading && <LoadingIndicator />}
      {tables.length > 0 && <Separator />}
      {tables.map((table) => (
        <button
          key={table.name}
          className={MENU_BUTTON_CLASSES}
          onClick={() => snap.setActiveDocsSection([API_DOCS_CATEGORIES.ENTITIES, table.name])}
        >
          {table.name}
        </button>
      ))}
    </>
  )
}

Subdomains

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free