restoring-title.tsx 698 B

123456789101112131415161718192021
  1. import { memo } from 'react'
  2. import { useTranslation } from 'react-i18next'
  3. import { useWorkflow } from '../hooks'
  4. import { useStore } from '../store'
  5. import { ClockRefresh } from '@/app/components/base/icons/src/vender/line/time'
  6. const RestoringTitle = () => {
  7. const { t } = useTranslation()
  8. const { formatTimeFromNow } = useWorkflow()
  9. const publishedAt = useStore(state => state.publishedAt)
  10. return (
  11. <div className='flex items-center h-[18px] text-xs text-gray-500'>
  12. <ClockRefresh className='mr-1 w-3 h-3 text-gray-500' />
  13. {t('workflow.common.latestPublished')}<span> </span>
  14. {formatTimeFromNow(publishedAt)}
  15. </div>
  16. )
  17. }
  18. export default memo(RestoringTitle)