empty.tsx 890 B

123456789101112131415161718192021222324252627282930
  1. import Button from '@/app/components/base/button'
  2. import { RiHistoryLine } from '@remixicon/react'
  3. import React, { type FC } from 'react'
  4. import { useTranslation } from 'react-i18next'
  5. type EmptyProps = {
  6. onResetFilter: () => void
  7. }
  8. const Empty: FC<EmptyProps> = ({
  9. onResetFilter,
  10. }) => {
  11. const { t } = useTranslation()
  12. return <div className='h-5/6 w-full flex flex-col justify-center gap-y-2'>
  13. <div className='flex justify-center'>
  14. <RiHistoryLine className='w-10 h-10 text-text-empty-state-icon' />
  15. </div>
  16. <div className='flex justify-center text-text-tertiary system-xs-regular'>
  17. {t('workflow.versionHistory.filter.empty')}
  18. </div>
  19. <div className='flex justify-center'>
  20. <Button size='small' onClick={onResetFilter}>
  21. {t('workflow.versionHistory.filter.reset')}
  22. </Button>
  23. </div>
  24. </div>
  25. }
  26. export default React.memo(Empty)