Home / Function/ SharedData() — supabase Function Reference

SharedData() — supabase Function Reference

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

Entity Profile

Relationship Graph

Source Code

apps/docs/components/SharedData.tsx lines 21–34

function SharedData({
  data,
  children,
}: {
  data: keyof typeof sharedData
  children: ((selectedData: (typeof sharedData)[keyof typeof sharedData]) => ReactNode) | string
}) {
  let selectedData = sharedData[data] as any
  return typeof children === 'string'
    ? ((typeof (selectedData = at(selectedData, [children])[0]) === 'object'
        ? `${selectedData.value ?? ''} ${selectedData.unit ?? ''}`.trim()
        : selectedData) as unknown as ReactNode)
    : children(selectedData)
}

Subdomains

Analyze Your Own Codebase

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

Try Supermodel Free