Merge branch 'feat/plugins' of https://github.com/langgenius/dify into feat/plugins
commit
7d4f8e0082
@ -1,16 +1,36 @@
|
|||||||
'use client'
|
'use client'
|
||||||
import type { FC } from 'react'
|
import type { FC } from 'react'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
import type { ToolWithProvider } from '../../../types'
|
||||||
|
import type { BlockEnum } from '../../../types'
|
||||||
|
import type { ToolDefaultValue } from '../../types'
|
||||||
|
import Tool from '../tool'
|
||||||
|
import { ViewType } from '../../view-type-select'
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
payload: ToolWithProvider[]
|
||||||
|
isShowLetterIndex: boolean
|
||||||
|
onSelect: (type: BlockEnum, tool?: ToolDefaultValue) => void
|
||||||
}
|
}
|
||||||
|
|
||||||
const ToolViewFlatView: FC<Props> = () => {
|
const ToolViewFlatView: FC<Props> = ({
|
||||||
|
payload,
|
||||||
|
isShowLetterIndex,
|
||||||
|
onSelect,
|
||||||
|
}) => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
list...
|
{payload.map(tool => (
|
||||||
|
<Tool
|
||||||
|
key={tool.id}
|
||||||
|
payload={tool}
|
||||||
|
viewType={ViewType.flat}
|
||||||
|
isShowLetterIndex={isShowLetterIndex}
|
||||||
|
onSelect={onSelect}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default React.memo(ToolViewFlatView)
|
export default React.memo(ToolViewFlatView)
|
||||||
|
|||||||
Loading…
Reference in New Issue