Home / Function/ internalDocToHref() — supabase Function Reference

internalDocToHref() — supabase Function Reference

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

Entity Profile

Relationship Graph

Source Code

apps/cms/src/components/RichText/index.tsx lines 32–39

const internalDocToHref = ({ linkNode }: { linkNode: SerializedLinkNode }) => {
  const { value, relationTo } = linkNode.fields.doc!
  if (typeof value !== 'object') {
    throw new Error('Expected value to be an object')
  }
  const slug = value.slug
  return relationTo === 'posts' ? `/posts/${slug}` : `/${slug}`
}

Domain

Subdomains

Analyze Your Own Codebase

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

Try Supermodel Free