dify/web/app/components/plugins/reference-setting-modal/auto-update-setting/no-data-placeholder.tsx
Stephen Zhou 6d0e36479b
refactor(i18n): use JSON with flattened key and namespace (#30114)
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-12-29 14:52:32 +08:00

32 lines
1.0 KiB
TypeScript

'use client'
import type { FC } from 'react'
import * as React from 'react'
import { useTranslation } from 'react-i18next'
import { SearchMenu } from '@/app/components/base/icons/src/vender/line/general'
import { Group } from '@/app/components/base/icons/src/vender/other'
import { cn } from '@/utils/classnames'
type Props = {
className: string
noPlugins?: boolean
}
const NoDataPlaceholder: FC<Props> = ({
className,
noPlugins,
}) => {
const { t } = useTranslation()
const icon = noPlugins ? (<Group className="size-6 text-text-quaternary" />) : (<SearchMenu className="size-8 text-text-tertiary" />)
const text = t(`autoUpdate.noPluginPlaceholder.${noPlugins ? 'noInstalled' : 'noFound'}`, { ns: 'plugin' })
return (
<div className={cn('flex items-center justify-center', className)}>
<div className="flex flex-col items-center">
{icon}
<div className="system-sm-regular mt-2 text-text-tertiary">{text}</div>
</div>
</div>
)
}
export default React.memo(NoDataPlaceholder)