feat(ui): integrate RichTextEditor for product full description and add click-outside handlers for dropdowns
Deploy Canina / deploy (push) Successful in 1m35s
E2E Playwright Tests / Run Full E2E & Security Suites (push) Failing after 7s

This commit is contained in:
parsa aghaei committed 2026-08-29 08:46:41 +03:30
1 parent 1651a593bd
commit bfb7f42065
18 files changed
+150012 -5970

No files matched your search

+6 -1
View File
@@ -43,6 +43,7 @@ export default function Header({
const [isPrescriptionModalOpen, setIsPrescriptionModalOpen] = useState(false);
const [isProfileMenuOpen, setIsProfileMenuOpen] = useState(false);
const userProfileRef = useRef<HTMLDivElement>(null);
const navBarRef = useRef<HTMLDivElement>(null);
const [searchQuery, setSearchQuery] = useState("");
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
const isB2BEnabled = useSettingsStore((s) => s.getBoolean('b2bRegistrationOpen', true) && s.getBoolean('b2b_enabled', true));
@@ -183,6 +184,10 @@ export default function Header({
if (userProfileRef.current && !userProfileRef.current.contains(event.target as Node)) {
setIsProfileMenuOpen(false);
}
if (navBarRef.current && !navBarRef.current.contains(event.target as Node)) {
setIsMegaMenuOpen(false);
setActiveDropdown(null);
}
}
document.addEventListener("mousedown", handleClickOutside);
return () => document.removeEventListener("mousedown", handleClickOutside);
@@ -378,7 +383,7 @@ export default function Header({
</div>
{/* BOTTOM ROW: Clean Organized Dropdown Navigation Bar (Desktop) */}
<div className="hidden lg:block border-t border-medical-gray-100 bg-medical-gray-50/50">
<div ref={navBarRef} className="hidden lg:block border-t border-medical-gray-100 bg-medical-gray-50/50">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex items-center gap-1 py-1 text-xs font-black">
<div className="flex items-center gap-1 xl:gap-2 text-xs font-bold font-vazir">