mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-09 19:06:51 +08:00
Fix variable typo (#8084)
This commit is contained in:
@@ -34,21 +34,21 @@ const Nav = ({
|
||||
const setAppDetail = useAppStore(state => state.setAppDetail)
|
||||
const [hovered, setHovered] = useState(false)
|
||||
const segment = useSelectedLayoutSegment()
|
||||
const isActived = Array.isArray(activeSegment) ? activeSegment.includes(segment!) : segment === activeSegment
|
||||
const isActivated = Array.isArray(activeSegment) ? activeSegment.includes(segment!) : segment === activeSegment
|
||||
|
||||
return (
|
||||
<div className={`
|
||||
flex items-center h-8 mr-0 sm:mr-3 px-0.5 rounded-xl text-sm shrink-0 font-medium
|
||||
${isActived && 'bg-components-main-nav-nav-button-bg-active shadow-md font-semibold'}
|
||||
${!curNav && !isActived && 'hover:bg-components-main-nav-nav-button-bg-hover'}
|
||||
${isActivated && 'bg-components-main-nav-nav-button-bg-active shadow-md font-semibold'}
|
||||
${!curNav && !isActivated && 'hover:bg-components-main-nav-nav-button-bg-hover'}
|
||||
`}>
|
||||
<Link href={link}>
|
||||
<div
|
||||
onClick={() => setAppDetail()}
|
||||
className={classNames(`
|
||||
flex items-center h-7 px-2.5 cursor-pointer rounded-[10px]
|
||||
${isActived ? 'text-components-main-nav-nav-button-text-active' : 'text-components-main-nav-nav-button-text'}
|
||||
${curNav && isActived && 'hover:bg-components-main-nav-nav-button-bg-active-hover'}
|
||||
${isActivated ? 'text-components-main-nav-nav-button-text-active' : 'text-components-main-nav-nav-button-text'}
|
||||
${curNav && isActivated && 'hover:bg-components-main-nav-nav-button-bg-active-hover'}
|
||||
`)}
|
||||
onMouseEnter={() => setHovered(true)}
|
||||
onMouseLeave={() => setHovered(false)}
|
||||
@@ -57,7 +57,7 @@ const Nav = ({
|
||||
{
|
||||
(hovered && curNav)
|
||||
? <ArrowNarrowLeft className='w-4 h-4' />
|
||||
: isActived
|
||||
: isActivated
|
||||
? activeIcon
|
||||
: icon
|
||||
}
|
||||
@@ -66,7 +66,7 @@ const Nav = ({
|
||||
</div>
|
||||
</Link>
|
||||
{
|
||||
curNav && isActived && (
|
||||
curNav && isActivated && (
|
||||
<>
|
||||
<div className='font-light text-gray-300 '>/</div>
|
||||
<NavSelector
|
||||
|
||||
@@ -11,7 +11,7 @@ import { useRouter } from 'next/navigation'
|
||||
import { debounce } from 'lodash-es'
|
||||
import cn from '@/utils/classnames'
|
||||
import AppIcon from '@/app/components/base/app-icon'
|
||||
import { AiText, ChatBot, CuteRobote } from '@/app/components/base/icons/src/vender/solid/communication'
|
||||
import { AiText, ChatBot, CuteRobot } from '@/app/components/base/icons/src/vender/solid/communication'
|
||||
import { Route } from '@/app/components/base/icons/src/vender/solid/mapsAndTravel'
|
||||
import { useAppContext } from '@/context/app-context'
|
||||
import { useStore as useAppStore } from '@/app/components/app/store'
|
||||
@@ -94,7 +94,7 @@ const NavSelector = ({ curNav, navs, createText, isApp, onCreate, onLoadmore }:
|
||||
<ChatBot className='w-2.5 h-2.5 text-[#1570EF]' />
|
||||
)}
|
||||
{nav.mode === 'agent-chat' && (
|
||||
<CuteRobote className='w-2.5 h-2.5 text-indigo-600' />
|
||||
<CuteRobot className='w-2.5 h-2.5 text-indigo-600' />
|
||||
)}
|
||||
{nav.mode === 'chat' && (
|
||||
<ChatBot className='w-2.5 h-2.5 text-[#1570EF]' />
|
||||
|
||||
Reference in New Issue
Block a user