add logo
This commit is contained in:
@@ -16,6 +16,8 @@ import Modal from '../utils/Modal';
|
|||||||
import LogoutPrompt from '@/features/general/LogoutPrompt';
|
import LogoutPrompt from '@/features/general/LogoutPrompt';
|
||||||
import useToggle from '@/hooks/helpers/useToggle';
|
import useToggle from '@/hooks/helpers/useToggle';
|
||||||
import { useAuthStore } from '@/zustand/authStore';
|
import { useAuthStore } from '@/zustand/authStore';
|
||||||
|
import { useGetAbout } from '@/app/[name]/(Main)/about/hooks/useAboutData';
|
||||||
|
import Image from 'next/image';
|
||||||
|
|
||||||
type MenuItemType = {
|
type MenuItemType = {
|
||||||
href: string | undefined;
|
href: string | undefined;
|
||||||
@@ -69,6 +71,7 @@ const isStandalone = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function SideMenu({ menuState, toggleMenuState, nightModeState, togglenightModeState }: Props) {
|
function SideMenu({ menuState, toggleMenuState, nightModeState, togglenightModeState }: Props) {
|
||||||
|
|
||||||
const menuStateMemo = useMemo(() => menuState, [menuState]);
|
const menuStateMemo = useMemo(() => menuState, [menuState]);
|
||||||
const closeRef = useRef<HTMLDivElement>(null);
|
const closeRef = useRef<HTMLDivElement>(null);
|
||||||
const userIsAuthenticated = useAuthStore((state) => state.isAuthenticated);
|
const userIsAuthenticated = useAuthStore((state) => state.isAuthenticated);
|
||||||
@@ -78,6 +81,7 @@ function SideMenu({ menuState, toggleMenuState, nightModeState, togglenightModeS
|
|||||||
const [deferredPrompt, setDeferredPrompt] = useState<BeforeInstallPromptEvent | null>(null);
|
const [deferredPrompt, setDeferredPrompt] = useState<BeforeInstallPromptEvent | null>(null);
|
||||||
const [isIOSDevice, setIsIOSDevice] = useState(false);
|
const [isIOSDevice, setIsIOSDevice] = useState(false);
|
||||||
const [isPWAInstalled, setIsPWAInstalled] = useState(false);
|
const [isPWAInstalled, setIsPWAInstalled] = useState(false);
|
||||||
|
const { data: aboutData } = useGetAbout();
|
||||||
|
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
const { name } = params;
|
const { name } = params;
|
||||||
@@ -140,8 +144,15 @@ function SideMenu({ menuState, toggleMenuState, nightModeState, togglenightModeS
|
|||||||
const renderMenu = () => {
|
const renderMenu = () => {
|
||||||
return (
|
return (
|
||||||
<section className="flex-1 overflow-y-scroll noscrollbar pt-20 pb-10 flex flex-col justify-between md:w-[160px] xl:w-[285px]">
|
<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=''>
|
<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>
|
<h6 className="text-start font-bold text-sm text-menu-header mt-2 mb-[19px] dark:text-disabled-text">منو</h6>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user