header.tsx 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. 'use client'
  2. import { useTranslation } from 'react-i18next'
  3. import { RiArrowRightUpLine, RiRobot2Line } from '@remixicon/react'
  4. import { useRouter } from 'next/navigation'
  5. import Button from '../components/base/button'
  6. import Avatar from './avatar'
  7. import LogoSite from '@/app/components/base/logo/logo-site'
  8. const Header = () => {
  9. const { t } = useTranslation()
  10. const router = useRouter()
  11. const back = () => {
  12. router.back()
  13. }
  14. return (
  15. <div className='flex flex-1 items-center justify-between px-4'>
  16. <div className='flex items-center gap-3'>
  17. <div className='flex items-center cursor-pointer' onClick={back}>
  18. <LogoSite className='object-contain' />
  19. </div>
  20. <div className='w-[1px] h-4 bg-divider-regular' />
  21. <p className='text-text-primary title-3xl-semi-bold'>{t('common.account.account')}</p>
  22. </div>
  23. <div className='flex items-center flex-shrink-0 gap-3'>
  24. <Button className='gap-2 py-2 px-3 system-sm-medium' onClick={back}>
  25. <RiRobot2Line className='w-4 h-4' />
  26. <p>{t('common.account.studio')}</p>
  27. <RiArrowRightUpLine className='w-4 h-4' />
  28. </Button>
  29. <div className='w-[1px] h-4 bg-divider-regular' />
  30. <Avatar />
  31. </div>
  32. </div>
  33. )
  34. }
  35. export default Header