fix bug design datepcker

This commit is contained in:
hamid zarghami
2026-06-07 12:37:41 +03:30
parent c65e8cd303
commit 032050bacc
3 changed files with 153 additions and 255 deletions
+8 -59
View File
@@ -12,14 +12,7 @@ import { useSharedStore } from "./store/sharedStore";
const SideBar: FC = () => {
const { t } = useTranslation("global");
const {
openSidebar,
setOpenSidebar,
hasSubMenu,
setSubMenuName,
setSubtMenu,
subMenuName,
} = useSharedStore();
const { openSidebar, setOpenSidebar, hasSubMenu, setSubMenuName, setSubtMenu, subMenuName } = useSharedStore();
const location = useLocation();
const isActive = (path: string) => {
@@ -44,12 +37,7 @@ const SideBar: FC = () => {
return (
<>
{openSidebar && (
<div
className="fixed top-0 left-0 right-0 bottom-0 bg-black/50 bg-opacity-50 z-10"
onClick={() => setOpenSidebar(false)}
/>
)}
{openSidebar && <div className="fixed top-0 left-0 right-0 bottom-0 bg-black/50 bg-opacity-50 z-10" onClick={() => setOpenSidebar(false)} />}
<div
className={clx(
"fixed xl:flex translate-x-[400px] xl:translate-x-0 transition-all ease-in-out opacity-0 invisible xl:visible xl:opacity-100 xl:right-4 right-0 xl:top-4 top-0 xl:bottom-4 bottom-0 xl:rounded-[32px] w-[250px] bg-white flex-col py-12",
@@ -57,33 +45,14 @@ const SideBar: FC = () => {
hasSubMenu && "w-24 rounded-tl-none! rounded-bl-none!",
)}
>
<div className="flex justify-center">
{!hasSubMenu ? (
<img src={LogoImage} className="w-[140px]" />
) : (
<img src={LogoSmall} className="w-7" />
)}
</div>
<div className="flex justify-center">{!hasSubMenu ? <img src={LogoImage} className="w-[140px]" /> : <img src={LogoSmall} className="w-7" />}</div>
<div className="flex-1 flex flex-col h-full overflow-y-auto no-scrollbar">
<div
className={clx(
"mt-10 px-12 text-header text-sm font-normal",
hasSubMenu && "px-2 text-center",
)}
>
{t("sidebar.menu")}
</div>
<div className={clx("mt-10 px-12 text-header text-sm font-normal", hasSubMenu && "px-2 text-center")}>{t("sidebar.menu")}</div>
<div className="text-xs text-[#8C90A3]">
<SideBarItem
icon={
<Home2
variant={isActive(Paths.home) ? "Bold" : "Outline"}
color={isActive(Paths.home) ? "black" : "#8C90A3"}
size={iconSizeSideBar}
/>
}
icon={<Home2 variant={isActive(Paths.home) ? "Bold" : "Outline"} color={isActive(Paths.home) ? "black" : "#8C90A3"} size={iconSizeSideBar} />}
title={t("sidebar.home_page")}
isActive={isActive(Paths.home)}
link={Paths.home}
@@ -91,13 +60,7 @@ const SideBar: FC = () => {
/>
<SideBarItem
icon={
<DocumentText
variant={isActive(Paths.catalog.list) ? "Bold" : "Outline"}
color={isActive(Paths.catalog.list) ? "black" : "#8C90A3"}
size={iconSizeSideBar}
/>
}
icon={<DocumentText variant={isActive(Paths.catalog.list) ? "Bold" : "Outline"} color={isActive(Paths.catalog.list) ? "black" : "#8C90A3"} size={iconSizeSideBar} />}
title={t("sidebar.catalog")}
isActive={isActive(Paths.catalog.list)}
link={Paths.catalog.list}
@@ -105,15 +68,7 @@ const SideBar: FC = () => {
/>
<SideBarItem
icon={
<Brush2
variant={
isActive(Paths.designer.request) ? "Bold" : "Outline"
}
color={isActive(Paths.designer.request) ? "black" : "#8C90A3"}
size={iconSizeSideBar}
/>
}
icon={<Brush2 variant={isActive(Paths.designer.request) ? "Bold" : "Outline"} color={isActive(Paths.designer.request) ? "black" : "#8C90A3"} size={iconSizeSideBar} />}
title={t("sidebar.request_design")}
isActive={isActive(Paths.designer.request)}
link={Paths.designer.request}
@@ -125,13 +80,7 @@ const SideBar: FC = () => {
<BuyCatalog />
<div className="text-xs text-[#8C90A3] mt-5">
<SideBarItem
icon={
<Logout
variant={isActive("logout") ? "Bold" : "Outline"}
color={isActive("logout") ? "black" : "#8C90A3"}
size={iconSizeSideBar}
/>
}
icon={<Logout variant={isActive("logout") ? "Bold" : "Outline"} color={isActive("logout") ? "black" : "#8C90A3"} size={iconSizeSideBar} />}
title="خروج"
isActive={isActive("logout")}
link={`#`}