mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-07-31 16:01:58 +08:00
30 lines
578 B
TypeScript
30 lines
578 B
TypeScript
'use client'
|
|
import type { FC } from 'react'
|
|
import classNames from '@/utils/classnames'
|
|
import { useSelector } from '@/context/app-context'
|
|
|
|
type LogoSiteProps = {
|
|
className?: string
|
|
}
|
|
|
|
const LogoSite: FC<LogoSiteProps> = ({
|
|
className,
|
|
}) => {
|
|
const { theme } = useSelector((s) => {
|
|
return {
|
|
theme: s.theme,
|
|
}
|
|
})
|
|
|
|
const src = theme === 'light' ? '/logo/logo-site.png' : `/logo/logo-site-${theme}.png`
|
|
return (
|
|
<img
|
|
src={src}
|
|
className={classNames('block w-auto h-10', className)}
|
|
alt='logo'
|
|
/>
|
|
)
|
|
}
|
|
|
|
export default LogoSite
|