mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-05-10 02:19:13 +08:00

Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: Yeuoly <admin@srmxy.cn> Co-authored-by: JzoNg <jzongcode@gmail.com> Co-authored-by: StyleZhang <jasonapring2015@outlook.com> Co-authored-by: jyong <jyong@dify.ai> Co-authored-by: nite-knite <nkCoding@gmail.com> Co-authored-by: jyong <718720800@qq.com>
22 lines
684 B
TypeScript
22 lines
684 B
TypeScript
import { memo } from 'react'
|
|
import { useTranslation } from 'react-i18next'
|
|
import { useWorkflow } from '../hooks'
|
|
import { useStore } from '../store'
|
|
import { ClockRefresh } from '@/app/components/base/icons/src/vender/line/time'
|
|
|
|
const RestoringTitle = () => {
|
|
const { t } = useTranslation()
|
|
const { formatTimeFromNow } = useWorkflow()
|
|
const publishedAt = useStore(state => state.publishedAt)
|
|
|
|
return (
|
|
<div className='flex items-center h-[18px] text-xs text-gray-500'>
|
|
<ClockRefresh className='mr-1 w-3 h-3 text-gray-500' />
|
|
{t('workflow.common.latestPublished')}
|
|
{formatTimeFromNow(publishedAt)}
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default memo(RestoringTitle)
|