Tree() — supabase Function Reference
Architecture documentation for the Tree() function in toc.tsx from the supabase codebase.
Entity Profile
Relationship Graph
Source Code
apps/learn/components/toc.tsx lines 82–107
function Tree({ tree, level = 1, activeItem }: TreeProps) {
return tree?.items?.length && level < 3 ? (
<ul className={cn('m-0 list-none', { 'pl-4': level !== 1 })}>
{tree.items.map((item, index) => {
return (
<li key={index} className={cn('mt-0 pt-2')}>
<a
href={item.url}
className={cn(
'inline-block no-underline transition-colors hover:text-foreground',
item.url === `#${activeItem}`
? 'font-medium text-foreground'
: 'text-foreground-muted'
)}
>
{item.title}
</a>
{item.items?.length ? (
<Tree tree={item} level={level + 1} activeItem={activeItem} />
) : null}
</li>
)
})}
</ul>
) : null
}
Domain
Subdomains
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free