useBlockViewer() — ui Function Reference
Architecture documentation for the useBlockViewer() function in block-viewer.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 490f6bb9_b906_4b05_666d_dac1a32689b9["useBlockViewer()"] c3ac54aa_58a5_8188_b5f8_014a382dcef3["block-viewer.tsx"] 490f6bb9_b906_4b05_666d_dac1a32689b9 -->|defined in| c3ac54aa_58a5_8188_b5f8_014a382dcef3 b46f1295_2e04_930f_58cd_6e7540fb38f1["BlockViewerToolbar()"] b46f1295_2e04_930f_58cd_6e7540fb38f1 -->|calls| 490f6bb9_b906_4b05_666d_dac1a32689b9 b86cc41c_89ef_774c_0ae0_64d5c49955ab["BlockViewerIframe()"] b86cc41c_89ef_774c_0ae0_64d5c49955ab -->|calls| 490f6bb9_b906_4b05_666d_dac1a32689b9 55836306_1300_411d_655c_9d2cc23cca26["BlockViewerView()"] 55836306_1300_411d_655c_9d2cc23cca26 -->|calls| 490f6bb9_b906_4b05_666d_dac1a32689b9 0887bbeb_c46e_9018_0da6_b952052bd209["BlockViewerMobile()"] 0887bbeb_c46e_9018_0da6_b952052bd209 -->|calls| 490f6bb9_b906_4b05_666d_dac1a32689b9 3abfe635_e5e5_c977_f89c_d70abd3dc63c["BlockViewerCode()"] 3abfe635_e5e5_c977_f89c_d70abd3dc63c -->|calls| 490f6bb9_b906_4b05_666d_dac1a32689b9 0b693b37_f436_96ec_70cf_f2a31e37a0cb["BlockViewerFileTree()"] 0b693b37_f436_96ec_70cf_f2a31e37a0cb -->|calls| 490f6bb9_b906_4b05_666d_dac1a32689b9 4064c7d8_5e7c_7ceb_7f98_0bb313b0664b["Tree()"] 4064c7d8_5e7c_7ceb_7f98_0bb313b0664b -->|calls| 490f6bb9_b906_4b05_666d_dac1a32689b9 d28b03ed_a078_cb19_66bb_89c8747602c9["BlockCopyCodeButton()"] d28b03ed_a078_cb19_66bb_89c8747602c9 -->|calls| 490f6bb9_b906_4b05_666d_dac1a32689b9 style 490f6bb9_b906_4b05_666d_dac1a32689b9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/components/block-viewer.tsx lines 84–90
function useBlockViewer() {
const context = React.useContext(BlockViewerContext)
if (!context) {
throw new Error("useBlockViewer must be used within a BlockViewerProvider.")
}
return context
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does useBlockViewer() do?
useBlockViewer() is a function in the ui codebase, defined in apps/v4/components/block-viewer.tsx.
Where is useBlockViewer() defined?
useBlockViewer() is defined in apps/v4/components/block-viewer.tsx at line 84.
What calls useBlockViewer()?
useBlockViewer() is called by 8 function(s): BlockCopyCodeButton, BlockViewerCode, BlockViewerFileTree, BlockViewerIframe, BlockViewerMobile, BlockViewerToolbar, BlockViewerView, Tree.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free