This commit is contained in:
hamid zarghami
2025-12-17 14:48:53 +03:30
parent 58ee5af8f9
commit 4fa360dc84
+12 -1
View File
@@ -16,6 +16,8 @@ import Modal from '../utils/Modal';
import LogoutPrompt from '@/features/general/LogoutPrompt';
import useToggle from '@/hooks/helpers/useToggle';
import { useAuthStore } from '@/zustand/authStore';
import { useGetAbout } from '@/app/[name]/(Main)/about/hooks/useAboutData';
import Image from 'next/image';
type MenuItemType = {
href: string | undefined;
@@ -69,6 +71,7 @@ const isStandalone = () => {
};
function SideMenu({ menuState, toggleMenuState, nightModeState, togglenightModeState }: Props) {
const menuStateMemo = useMemo(() => menuState, [menuState]);
const closeRef = useRef<HTMLDivElement>(null);
const userIsAuthenticated = useAuthStore((state) => state.isAuthenticated);
@@ -78,6 +81,7 @@ function SideMenu({ menuState, toggleMenuState, nightModeState, togglenightModeS
const [deferredPrompt, setDeferredPrompt] = useState<BeforeInstallPromptEvent | null>(null);
const [isIOSDevice, setIsIOSDevice] = useState(false);
const [isPWAInstalled, setIsPWAInstalled] = useState(false);
const { data: aboutData } = useGetAbout();
const params = useParams();
const { name } = params;
@@ -140,8 +144,15 @@ function SideMenu({ menuState, toggleMenuState, nightModeState, togglenightModeS
const renderMenu = () => {
return (
<section className="flex-1 overflow-y-scroll noscrollbar pt-20 pb-10 flex flex-col justify-between md:w-[160px] xl:w-[285px]">
{
aboutData?.data?.logo && (
<div className='px-5'>
<Image src={aboutData?.data?.logo} alt='logo' width={110} height={100} unoptimized />
</div>
)
}
<div className=''>
<header className="px-5 pt-6 mt-3 md:px-6 xl:px-12">
<header className="px-5 md:px-6 xl:px-12">
<h6 className="text-start font-bold text-sm text-menu-header mt-2 mb-[19px] dark:text-disabled-text">منو</h6>
</header>