dify/web/app/(commonLayout)/datasets/NewDatasetCard.tsx

31 lines
1.0 KiB
TypeScript
Raw Normal View History

2023-05-15 08:51:32 +08:00
'use client'
2024-03-25 07:13:50 +00:00
import { forwardRef } from 'react'
2023-05-15 08:51:32 +08:00
import classNames from 'classnames'
import { useTranslation } from 'react-i18next'
2024-03-25 07:13:50 +00:00
import Link from 'next/link'
2023-05-15 08:51:32 +08:00
import style from '../list.module.css'
const CreateAppCard = forwardRef<HTMLAnchorElement>((_, ref) => {
2023-05-15 08:51:32 +08:00
const { t } = useTranslation()
return (
2024-03-25 07:13:50 +00:00
<Link ref={ref} className={classNames(style.listItem, style.newItemCard)} href='/datasets/create'>
2023-05-15 08:51:32 +08:00
<div className={style.listItemTitle}>
<span className={style.newItemIcon}>
<span className={classNames(style.newItemIconImage, style.newItemIconAdd)} />
</span>
<div className={classNames(style.listItemHeading, style.newItemCardHeading)}>
{t('dataset.createDataset')}
</div>
</div>
<div className={style.listItemDescription}>{t('dataset.createDatasetIntro')}</div>
{/* <div className='text-xs text-gray-500'>{t('app.createFromConfigFile')}</div> */}
2024-03-25 07:13:50 +00:00
</Link>
2023-05-15 08:51:32 +08:00
)
})
2023-05-15 08:51:32 +08:00
2024-03-25 07:13:50 +00:00
CreateAppCard.displayName = 'CreateAppCard'
2023-05-15 08:51:32 +08:00
export default CreateAppCard