Files
dify/web/app/components/apps/empty.tsx
莫小帅 95528ad8e5 fix: ensure "No apps found" text is visible on small screens (#28929)
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-11-29 17:21:39 +08:00

36 lines
832 B
TypeScript

import React from 'react'
import { useTranslation } from 'react-i18next'
const DefaultCards = React.memo(() => {
const renderArray = Array.from({ length: 36 })
return (
<>
{
renderArray.map((_, index) => (
<div
key={index}
className='inline-flex h-[160px] rounded-xl bg-background-default-lighter'
/>
))
}
</>
)
})
const Empty = () => {
const { t } = useTranslation()
return (
<>
<DefaultCards />
<div className='absolute inset-0 z-20 flex items-center justify-center bg-gradient-to-t from-background-body to-transparent pointer-events-none'>
<span className='system-md-medium text-text-tertiary'>
{t('app.newApp.noAppsFound')}
</span>
</div>
</>
)
}
export default React.memo(Empty)