fix: imports
This commit is contained in:
@@ -20,6 +20,8 @@ import {
|
||||
getConfigTypeId,
|
||||
isGroup,
|
||||
type ConfigTypeId,
|
||||
type InsertBlockGroup,
|
||||
type InsertBlock,
|
||||
} from '@/lib/graph/configTypes'
|
||||
import {
|
||||
BaseNode,
|
||||
@@ -192,13 +194,13 @@ function ConfigNodeComponent({ id, data, width, height, selected }: Props) {
|
||||
|
||||
const insertBlocksContent = useMemo(() => {
|
||||
const templatingGroup = configType.insertBlocks.find(
|
||||
(b): b is import('../../lib/configTypes').InsertBlockGroup => isGroup(b) && b.label === 'Templating'
|
||||
(b): b is InsertBlockGroup => isGroup(b) && b.label === 'Templating'
|
||||
)
|
||||
const typeBlocks = configType.insertBlocks.filter((b) => !(isGroup(b) && b.label === 'Templating'))
|
||||
const insertShortcut = <MenubarShortcut className="opacity-0 group-hover:opacity-100 transition-opacity"><Kbd>Insert</Kbd></MenubarShortcut>
|
||||
const typeItems = typeBlocks.flatMap((block) =>
|
||||
isGroup(block)
|
||||
? block.items.map(({ label, snippet }) => (
|
||||
? block.items.map(({ label, snippet }: InsertBlock) => (
|
||||
<MenubarItem
|
||||
key={label}
|
||||
className="text-xs flex items-center group"
|
||||
@@ -220,7 +222,7 @@ function ConfigNodeComponent({ id, data, width, height, selected }: Props) {
|
||||
]
|
||||
)
|
||||
const templatingItems =
|
||||
templatingGroup?.items.map(({ label, snippet }) => (
|
||||
templatingGroup?.items.map(({ label, snippet }: InsertBlock) => (
|
||||
<MenubarItem
|
||||
key={label}
|
||||
className="text-xs flex items-center group"
|
||||
|
||||
Reference in New Issue
Block a user