logo-site.tsx 578 B

123456789101112131415161718192021222324252627282930
  1. 'use client'
  2. import type { FC } from 'react'
  3. import classNames from '@/utils/classnames'
  4. import { useSelector } from '@/context/app-context'
  5. type LogoSiteProps = {
  6. className?: string
  7. }
  8. const LogoSite: FC<LogoSiteProps> = ({
  9. className,
  10. }) => {
  11. const { theme } = useSelector((s) => {
  12. return {
  13. theme: s.theme,
  14. }
  15. })
  16. const src = theme === 'light' ? '/logo/logo-site.png' : `/logo/logo-site-${theme}.png`
  17. return (
  18. <img
  19. src={src}
  20. className={classNames('block w-auto h-10', className)}
  21. alt='logo'
  22. />
  23. )
  24. }
  25. export default LogoSite