primary color footer + when click on chat open chatbot

This commit is contained in:
hamid zarghami
2025-12-08 10:02:04 +03:30
parent 69d89b29d4
commit 658ab51eef
+12 -3
View File
@@ -6,11 +6,14 @@ import CategoryModal from './CategoryModal'
import { useSharedStore } from '@/share/store/sharedStore'
import { useLocalCart } from '@/app/product/hooks/useLocalCart'
import { useGetCart } from '@/app/cart/hooks/useCartData'
import { PRIMARY_COLOR } from '@/config/const'
import ChatbotWidget from '@/app/chatbot/components/ChatbotWidget'
const MobileBottomMenu: FC = () => {
const router = useRouter()
const pathname = usePathname()
const [isCategoryModalOpen, setIsCategoryModalOpen] = useState(false)
const [isChatbotOpen, setIsChatbotOpen] = useState(false)
const { isLogin } = useSharedStore()
// Get cart count based on login status
@@ -35,7 +38,7 @@ const MobileBottomMenu: FC = () => {
icon: MessageText,
label: 'چت',
path: '/profile/chat',
onClick: () => handleNavigation(isLogin ? '/profile/chat' : '/auth')
onClick: () => setIsChatbotOpen(true)
},
{
icon: ShoppingCart,
@@ -71,13 +74,13 @@ const MobileBottomMenu: FC = () => {
<button
key={index}
onClick={item.onClick}
className={`flex flex-col items-center gap-1 p-2 min-w-0 flex-1 ${isActive ? 'text-purple-600' : 'text-gray-600'
className={`flex flex-col items-center gap-1 p-2 min-w-0 flex-1 ${isActive ? 'text-primary' : 'text-gray-600'
}`}
>
<div className="relative">
<IconComponent
size={24}
color={isActive ? '#9333ea' : '#6b7280'}
color={isActive ? PRIMARY_COLOR : '#6b7280'}
/>
{/* Badge for cart count */}
{item.badge !== undefined && (
@@ -98,6 +101,12 @@ const MobileBottomMenu: FC = () => {
isOpen={isCategoryModalOpen}
onClose={() => setIsCategoryModalOpen(false)}
/>
{/* Chatbot Widget */}
<ChatbotWidget
isOpen={isChatbotOpen}
onClose={() => setIsChatbotOpen(false)}
/>
</>
)
}