header.tsx 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. 'use client'
  2. import type { FC } from 'react'
  3. import React from 'react'
  4. import { useTranslation } from 'react-i18next'
  5. import { Settings01 } from '@/app/components/base/icons/src/vender/line/general'
  6. import { BookOpen01 } from '@/app/components/base/icons/src/vender/line/education'
  7. const I18N_PREFIX = 'datasetCreation.stepOne.website'
  8. type Props = {
  9. onSetting: () => void
  10. }
  11. const Header: FC<Props> = ({
  12. onSetting,
  13. }) => {
  14. const { t } = useTranslation()
  15. return (
  16. <div className='flex h-6 items-center justify-between'>
  17. <div className='flex items-center'>
  18. <div className='text-base font-medium text-gray-700'>{t(`${I18N_PREFIX}.jinaReaderTitle`)}</div>
  19. <div className='ml-2 mr-1 w-px h-3.5 bg-gray-200'></div>
  20. <div
  21. className='p-1 rounded-md hover:bg-black/5 cursor-pointer'
  22. onClick={onSetting}
  23. >
  24. <Settings01 className='w-3.5 h-3.5 text-gray-500' />
  25. </div>
  26. </div>
  27. <a
  28. href='https://jina.ai/reader'
  29. target='_blank' rel='noopener noreferrer'
  30. className='flex items-center text-xs text-primary-600'
  31. >
  32. <BookOpen01 className='mr-1 w-3.5 h-3.5 text-primary-600' />
  33. {t(`${I18N_PREFIX}.jinaReaderDoc`)}
  34. </a>
  35. </div>
  36. )
  37. }
  38. export default React.memo(Header)