Files
dify-plus/web/app/components/header/explore-nav/index.tsx
T
npc0-hue 062c8a5b22 fix: 升级依赖并修复相关问题
- 升级web依赖到最新版本
- 修复1.11.4版本兼容性问题
- 解决google字体dockerfile访问问题
- 恢复丢失的相关文件
- 添加多语言支持
- 调整docker版本及worker镜像配置
2026-01-28 09:40:42 +08:00

41 lines
1.1 KiB
TypeScript

'use client'
import {
RiPlanetFill,
RiPlanetLine,
} from '@remixicon/react'
import Link from 'next/link'
import { useSelectedLayoutSegment } from 'next/navigation'
import { useTranslation } from 'react-i18next'
import { cn } from '@/utils/classnames'
type ExploreNavProps = {
className?: string
}
const ExploreNav = ({
className,
}: ExploreNavProps) => {
const { t } = useTranslation()
const selectedSegment = useSelectedLayoutSegment()
const activated = selectedSegment === 'explore'
return (
<Link
href="/explore/apps-center-extend"
className={cn(className, 'group', activated && 'bg-components-main-nav-nav-button-bg-active shadow-md', activated ? 'text-components-main-nav-nav-button-text-active' : 'text-components-main-nav-nav-button-text hover:bg-components-main-nav-nav-button-bg-hover')}
>
{
activated
? <RiPlanetFill className="h-4 w-4" />
: <RiPlanetLine className="h-4 w-4" />
}
<div className="ml-2 max-[1024px]:hidden">
{t('menus.explore', { ns: 'common' })}
</div>
</Link>
)
}
export default ExploreNav