Home / Function/ BlockDisplay() — ui Function Reference

BlockDisplay() — ui Function Reference

Architecture documentation for the BlockDisplay() function in block-display.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  9b309d8e_54e1_7a4f_9ad7_5faa0a96aefc["BlockDisplay()"]
  794ed575_b54d_e225_c4f8_8572f3888b67["block-display.tsx"]
  9b309d8e_54e1_7a4f_9ad7_5faa0a96aefc -->|defined in| 794ed575_b54d_e225_c4f8_8572f3888b67
  d8edcc26_6ef5_d23a_61e1_a3d9b7dd33b4["getCachedRegistryItem()"]
  9b309d8e_54e1_7a4f_9ad7_5faa0a96aefc -->|calls| d8edcc26_6ef5_d23a_61e1_a3d9b7dd33b4
  ca8dc0ad_661d_c31f_7967_7a2b861272d0["getCachedFileTree()"]
  9b309d8e_54e1_7a4f_9ad7_5faa0a96aefc -->|calls| ca8dc0ad_661d_c31f_7967_7a2b861272d0
  81d01447_1009_ca31_0b59_c3d7e733ef75["getCachedHighlightedFiles()"]
  9b309d8e_54e1_7a4f_9ad7_5faa0a96aefc -->|calls| 81d01447_1009_ca31_0b59_c3d7e733ef75
  style 9b309d8e_54e1_7a4f_9ad7_5faa0a96aefc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

deprecated/www/components/block-display.tsx lines 12–27

export async function BlockDisplay({ name }: { name: string }) {
  const item = await getCachedRegistryItem(name)

  if (!item?.files) {
    return null
  }

  const [tree, highlightedFiles] = await Promise.all([
    getCachedFileTree(item.files),
    getCachedHighlightedFiles(item.files),
  ])

  return (
    <BlockViewer item={item} tree={tree} highlightedFiles={highlightedFiles} />
  )
}

Subdomains

Frequently Asked Questions

What does BlockDisplay() do?
BlockDisplay() is a function in the ui codebase, defined in deprecated/www/components/block-display.tsx.
Where is BlockDisplay() defined?
BlockDisplay() is defined in deprecated/www/components/block-display.tsx at line 12.
What does BlockDisplay() call?
BlockDisplay() calls 3 function(s): getCachedFileTree, getCachedHighlightedFiles, getCachedRegistryItem.

Analyze Your Own Codebase

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

Try Supermodel Free