dify/web/app/components/datasets/create-from-pipeline/list/customized-list.tsx
Stephen Zhou a84c2d36a3
style: format with vp fmt (#38803)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-12 15:57:46 +00:00

27 lines
875 B
TypeScript

import { useTranslation } from 'react-i18next'
import { usePipelineTemplateList } from '@/service/use-pipeline'
import TemplateCard from './template-card'
const CustomizedList = () => {
const { t } = useTranslation()
const { data: pipelineList, isLoading } = usePipelineTemplateList({ type: 'customized' })
const list = pipelineList?.pipeline_templates || []
if (isLoading || list.length === 0) return null
return (
<>
<div className="pt-2 system-sm-semibold-uppercase text-text-tertiary">
{t(($) => $['templates.customized'], { ns: 'datasetPipeline' })}
</div>
<div className="grid grid-cols-[repeat(auto-fill,minmax(296px,1fr))] gap-3 py-2">
{list.map((pipeline, index) => (
<TemplateCard key={index} type="customized" pipeline={pipeline} />
))}
</div>
</>
)
}
export default CustomizedList