Home / Function/ RefSections() — supabase Function Reference

RefSections() — supabase Function Reference

Architecture documentation for the RefSections() function in Reference.sections.tsx from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  8da04450_4f4e_03ff_c3f0_f70a6d49d31c["RefSections()"]
  32dd3152_4871_894d_754e_0b5325558dba["getFlattenedSections()"]
  8da04450_4f4e_03ff_c3f0_f70a6d49d31c -->|calls| 32dd3152_4871_894d_754e_0b5325558dba
  8d2a7e7a_d6f7_f40b_1877_9d33536b34a7["trimIntro()"]
  8da04450_4f4e_03ff_c3f0_f70a6d49d31c -->|calls| 8d2a7e7a_d6f7_f40b_1877_9d33536b34a7
  style 8da04450_4f4e_03ff_c3f0_f70a6d49d31c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/docs/features/docs/Reference.sections.tsx lines 47–72

async function RefSections({ libraryId, version }: RefSectionsProps) {
  let flattenedSections = await getFlattenedSections(libraryId, version)
  if (flattenedSections) {
    flattenedSections = trimIntro(flattenedSections)
  }

  if (!isFeatureEnabled('sdk:auth') && clientSdkIds.includes(libraryId)) {
    flattenedSections = flattenedSections?.filter(
      (section) =>
        'product' in section && section.product !== 'auth' && section.product !== 'auth-admin'
    )
  }

  return (
    <div className="flex flex-col my-16 gap-16">
      {(flattenedSections || [])
        .filter((section) => section.type !== 'category')
        .map((section, idx) => (
          <Fragment key={`${section.id}-${idx}`}>
            <SectionDivider />
            <SectionSwitch libraryId={libraryId} version={version} section={section} />
          </Fragment>
        ))}
    </div>
  )
}

Subdomains

Frequently Asked Questions

What does RefSections() do?
RefSections() is a function in the supabase codebase.
What does RefSections() call?
RefSections() calls 2 function(s): getFlattenedSections, trimIntro.

Analyze Your Own Codebase

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

Try Supermodel Free