MCPcopy Create free account
hub / github.com/ecomfe/tempad-dev / getMainComponentSummary

Function getMainComponentSummary

packages/extension/utils/component.ts:77–88  ·  view source on GitHub ↗
(node: SceneNode)

Source from the content-addressed store, hash-verified

75}
76
77function getMainComponentSummary(node: SceneNode): { id: string; name: string } | null {
78 if (!('mainComponent' in node)) {
79 return null
80 }
81
82 try {
83 const mainComponent = node.mainComponent
84 return mainComponent ? { id: mainComponent.id, name: mainComponent.name } : null
85 } catch {
86 return null
87 }
88}
89
90function getChildren(node: SceneNode): DesignNode[] | null {
91 if (!('children' in node)) {

Callers 1

getDesignComponentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected