dify/web/features/new-rag/knowledge-route-placeholder.tsx
Stephen Zhou 2a0661a769
feat(dataset): add New Knowledge creation flow (#39315)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-23 07:25:14 +00:00

23 lines
788 B
TypeScript

'use client'
import { useTranslation } from 'react-i18next'
export function KnowledgeRoutePlaceholder({ type }: { type: 'documents' | 'sources' }) {
const { t } = useTranslation('dataset')
return (
<div className="flex min-h-full flex-col items-center justify-center px-6 py-16 text-center">
<span
aria-hidden
className={`${type === 'sources' ? 'i-ri-links-line' : 'i-ri-file-text-line'} size-7 text-text-tertiary`}
/>
<h2 className="mt-4 title-xl-semi-bold text-text-primary">
{t(($) => (type === 'sources' ? $['newKnowledge.sources'] : $['newKnowledge.documents']))}
</h2>
<p className="mt-2 max-w-md body-sm-regular text-text-tertiary">
{t(($) => $['newKnowledge.routeUnavailable'])}
</p>
</div>
)
}