You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

customized-list.tsx 897B

1234567891011121314151617181920212223242526272829
  1. import TemplateCard from './template-card'
  2. import { usePipelineTemplateList } from '@/service/use-pipeline'
  3. import { useTranslation } from 'react-i18next'
  4. const CustomizedList = () => {
  5. const { t } = useTranslation()
  6. const { data: pipelineList, isLoading } = usePipelineTemplateList({ type: 'customized' })
  7. const list = pipelineList?.pipeline_templates || []
  8. if (isLoading || list.length === 0)
  9. return null
  10. return (
  11. <>
  12. <div className='system-sm-semibold-uppercase pt-2 text-text-tertiary'>{t('datasetPipeline.templates.customized')}</div>
  13. <div className='grid grid-cols-1 gap-3 py-2 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4'>
  14. {list.map((pipeline, index) => (
  15. <TemplateCard
  16. key={index}
  17. type='customized'
  18. pipeline={pipeline}
  19. />
  20. ))}
  21. </div>
  22. </>
  23. )
  24. }
  25. export default CustomizedList