Commit 0bacc586 by Arjun Jhukal

updated the menu clip

parent c877b0ab
...@@ -6,6 +6,7 @@ import { getAllMenus } from "@/serverApi/menu"; ...@@ -6,6 +6,7 @@ import { getAllMenus } from "@/serverApi/menu";
import { useGetAllUserMenuQuery } from "@/services/menuApi"; import { useGetAllUserMenuQuery } from "@/services/menuApi";
import Link from "next/link"; import Link from "next/link";
import { usePathname } from "next/navigation"; import { usePathname } from "next/navigation";
import SupportIcon from "@/app/customIcons/SupportIcon";
export default function PrimaryMenu({ open }: { open: boolean }) { export default function PrimaryMenu({ open }: { open: boolean }) {
const { data, isLoading } = useGetAllUserMenuQuery(); const { data, isLoading } = useGetAllUserMenuQuery();
...@@ -52,7 +53,7 @@ export default function PrimaryMenu({ open }: { open: boolean }) { ...@@ -52,7 +53,7 @@ export default function PrimaryMenu({ open }: { open: boolean }) {
onMouseLeave={handleMouseLeave} onMouseLeave={handleMouseLeave}
style={{ style={{
position: 'relative', position: 'relative',
maxHeight: "280px", maxHeight: "calc(100vh - 500px)",
overflowY: "auto" overflowY: "auto"
}}> }}>
<div <div
...@@ -100,7 +101,7 @@ export default function PrimaryMenu({ open }: { open: boolean }) { ...@@ -100,7 +101,7 @@ export default function PrimaryMenu({ open }: { open: boolean }) {
</ListItemIcon> </ListItemIcon>
<ListItemText <ListItemText
primary={menu?.name} primary={menu?.name}
className={open ? "expanded !text-wrap" : "collapsed !text-nowrap"} className={` line-clamp-2 ${open ? "expanded !text-wrap" : "collapsed !text-nowrap"}`}
/> />
</Link> </Link>
</ListItem> </ListItem>
...@@ -110,6 +111,26 @@ export default function PrimaryMenu({ open }: { open: boolean }) { ...@@ -110,6 +111,26 @@ export default function PrimaryMenu({ open }: { open: boolean }) {
<p></p> <p></p>
) )
} }
{/* 💬 Support Section */}
<div className={`support mt-4 ${open ? "px-3" : ""}`}>
<Link
href={"/support"}
className="ss-btn support__btn flex items-center gap-2 w-full justify-start"
>
<SupportIcon />
{open ? (
<strong className="text-[14px] font-semibold opacity-80 !text-white">
Support
</strong>
) : null}
</Link>
{open ? (
<div className="mt-2 text-[11px] lg:text-[12px] text-center">
<div className="w-[8px] h-[8px] bg-green-500 rounded-full inline-block"></div>
<span className="opacity-70 !text-white"> 24x7 Support available</span>
</div>
) : null}
</div>
</List> </List>
); );
} }
...@@ -167,26 +167,7 @@ export default function UserMenu({ open }: { open: boolean }) { ...@@ -167,26 +167,7 @@ export default function UserMenu({ open }: { open: boolean }) {
</div> </div>
</Box> </Box>
{/* 💬 Support Section */}
<div className={`support mt-4 ${open ? "px-3" : ""}`}>
<Link
href={"/support"}
className="ss-btn support__btn flex items-center gap-2 w-full justify-start"
>
<SupportIcon />
{open ? (
<strong className="text-[14px] font-semibold opacity-80 !text-white">
Support
</strong>
) : null}
</Link>
{open ? (
<div className="mt-2 text-[11px] lg:text-[12px] text-center">
<div className="w-[8px] h-[8px] bg-green-500 rounded-full inline-block"></div>
<span className="opacity-70 !text-white"> 24x7 Support available</span>
</div>
) : null}
</div>
</> </>
); );
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment