first commit
This commit is contained in:
@@ -0,0 +1,278 @@
|
||||
|
||||
|
||||
'use client'
|
||||
import Image from "next/image";
|
||||
import React, { useState } from "react";
|
||||
import Link from "next/link";
|
||||
import { usePathname } from "next/navigation";
|
||||
import MenuLink from "./MenuLink";
|
||||
import MenuLinkTwo from "./MenuLinkTwo";
|
||||
const HomeDropdown = [
|
||||
{
|
||||
img: "home06",
|
||||
routerPath: "/",
|
||||
inenerText: "",
|
||||
inenerTextWrapClass: "",
|
||||
clasName: `dropdown-item img-box`,
|
||||
title: "Product Landing Dark",
|
||||
},
|
||||
{
|
||||
img: "home01",
|
||||
routerPath: "/home",
|
||||
inenerText: "",
|
||||
inenerTextWrapClass: "",
|
||||
clasName: `dropdown-item img-box`,
|
||||
title: "Event Organizer",
|
||||
},
|
||||
{
|
||||
img: "home02",
|
||||
routerPath: "/doc-landing",
|
||||
inenerText: "",
|
||||
inenerTextWrapClass: "",
|
||||
clasName: `dropdown-item img-box`,
|
||||
title: "Doc Landing",
|
||||
},
|
||||
{
|
||||
img: "home03",
|
||||
routerPath: "/project-management",
|
||||
inenerText: "",
|
||||
inenerTextWrapClass: "",
|
||||
clasName: `dropdown-item img-box`,
|
||||
title: "Project Management",
|
||||
},
|
||||
];
|
||||
|
||||
const Pricing = [
|
||||
{
|
||||
name: "Customer Support",
|
||||
routerPath: "/pricing-cs",
|
||||
},
|
||||
{
|
||||
name: "Event Organiser",
|
||||
routerPath: "/pricing-eo",
|
||||
},
|
||||
{
|
||||
name: "Project Management",
|
||||
routerPath: "/pricing-pm",
|
||||
},
|
||||
];
|
||||
const AboutUs = [
|
||||
{
|
||||
name: "Customer Support",
|
||||
routerPath: "/about-cs",
|
||||
},
|
||||
{
|
||||
name: "Event Organiser",
|
||||
routerPath: "/about-eo",
|
||||
},
|
||||
{
|
||||
name: "Project Management",
|
||||
routerPath: "/about-pm",
|
||||
},
|
||||
{
|
||||
name: "Documentation",
|
||||
routerPath: "/about-doc",
|
||||
},
|
||||
];
|
||||
|
||||
const ContactUS = [
|
||||
{
|
||||
name: "Customer Support",
|
||||
routerPath: "/contact-cs",
|
||||
},
|
||||
{
|
||||
name: "Event Organiser",
|
||||
routerPath: "/contact-eo",
|
||||
},
|
||||
{
|
||||
name: "Project Management",
|
||||
routerPath: "/contact-pm",
|
||||
},
|
||||
{
|
||||
name: "Documentation",
|
||||
routerPath: "/contact-doc",
|
||||
},
|
||||
];
|
||||
const Team = [
|
||||
{
|
||||
name: "Team Version 01",
|
||||
routerPath: "/team-1",
|
||||
},
|
||||
{
|
||||
name: "Team Version 02",
|
||||
routerPath: "/team-2",
|
||||
},
|
||||
{
|
||||
name: "Team Version 03",
|
||||
routerPath: "/team-3",
|
||||
},
|
||||
{
|
||||
name: "Team Version 04",
|
||||
routerPath: "/team-4",
|
||||
},
|
||||
{
|
||||
name: "Team Version 05",
|
||||
routerPath: "/team-5",
|
||||
},
|
||||
{
|
||||
name: "Team Version 06",
|
||||
routerPath: "/team-6",
|
||||
},
|
||||
{
|
||||
name: "Team Details",
|
||||
routerPath: "/teams/1",
|
||||
},
|
||||
{
|
||||
name: "Team Details Slider",
|
||||
routerPath: "/team-details-v2/1",
|
||||
},
|
||||
];
|
||||
|
||||
const Services = [
|
||||
{
|
||||
name: "Service Version 01",
|
||||
routerPath: "/service-v1",
|
||||
},
|
||||
{
|
||||
name: "Service Version 02",
|
||||
routerPath: "/service-v2",
|
||||
},
|
||||
{
|
||||
name: "Service Version 03",
|
||||
routerPath: "/service-v3",
|
||||
},
|
||||
{
|
||||
name: "Service Version 04",
|
||||
routerPath: "/service-v4",
|
||||
},
|
||||
{
|
||||
name: "Service Details",
|
||||
routerPath: "/services/1",
|
||||
},
|
||||
];
|
||||
const Miscellaneous = [
|
||||
{
|
||||
name: "Terms & Condition",
|
||||
routerPath: "/terms-conditions",
|
||||
},
|
||||
{
|
||||
name: "Login",
|
||||
routerPath: "/login",
|
||||
},
|
||||
{
|
||||
name: "Signup",
|
||||
routerPath: "/signup",
|
||||
},
|
||||
{
|
||||
name: "404",
|
||||
routerPath: "/not-found",
|
||||
},
|
||||
];
|
||||
const Portfolio = [
|
||||
{
|
||||
name: "Classic Style",
|
||||
routerPath: "/classic-style",
|
||||
},
|
||||
{
|
||||
name: "Grid 2 Columns",
|
||||
routerPath: "/grid-two-col",
|
||||
},
|
||||
{
|
||||
name: "Grid 3 Columns",
|
||||
routerPath: "/grid-three-col",
|
||||
},
|
||||
{
|
||||
name: "Gallery Slider",
|
||||
routerPath: "/gallery-slider",
|
||||
},
|
||||
{
|
||||
name: "Grid Single",
|
||||
routerPath: "/grid-single",
|
||||
},
|
||||
{
|
||||
name: "Classic Details",
|
||||
routerPath: "/portfolios/3",
|
||||
},
|
||||
];
|
||||
const Blogs = [
|
||||
{
|
||||
name: "Blog Version 01",
|
||||
routerPath: "/blog-v1",
|
||||
},
|
||||
{
|
||||
name: "Blog Version 02",
|
||||
routerPath: "/blog-v2",
|
||||
},
|
||||
{
|
||||
name: "Blog Version 03",
|
||||
routerPath: "/blog-v3",
|
||||
},
|
||||
{
|
||||
name: "Blog Version 04",
|
||||
routerPath: "/blog-v4",
|
||||
},
|
||||
{
|
||||
name: "Blog Version 05",
|
||||
routerPath: "/blog-v5",
|
||||
},
|
||||
{
|
||||
name: "Blog Version 06",
|
||||
routerPath: "/blog-v6",
|
||||
},
|
||||
{
|
||||
name: "Blog Details",
|
||||
routerPath: "/blogs/1",
|
||||
},
|
||||
];
|
||||
const Docs = [
|
||||
{
|
||||
name: "Full Width",
|
||||
routerPath: "/doc-full-width",
|
||||
},
|
||||
{
|
||||
name: "Full Width Banner",
|
||||
routerPath: "/doc-full-width-banner",
|
||||
},
|
||||
{
|
||||
name: "Doc Box",
|
||||
routerPath: "/doc-box",
|
||||
},
|
||||
{
|
||||
name: "Doc Box With Banner",
|
||||
routerPath: "/doc-box-with-banner",
|
||||
},
|
||||
{
|
||||
name: "Changelog ***",
|
||||
routerPath: "/changelog",
|
||||
},
|
||||
];
|
||||
|
||||
const MegaMenu = () => {
|
||||
const pathname = usePathname();
|
||||
const [currentTopRoute, setCurrentTopRoute] = useState('Home')
|
||||
return (
|
||||
<ul className="navbar-nav">
|
||||
<li className={currentTopRoute == 'Home' ? "nav-item position-static active":"nav-item position-static" } >
|
||||
<a className="nav-link" href="/" data-toggle="dropdown">
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li className={currentTopRoute == 'Pages' ? "nav-item active":"nav-item" }>
|
||||
<a className={currentTopRoute == 'Pages' ? "nav-link active":"nav-link"} href="/about-cs" data-toggle="dropdown">
|
||||
About
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li className={currentTopRoute == 'Blogs' ? "nav-item active":"nav-item" }>
|
||||
<a className={currentTopRoute == 'Blogs' ? "nav-link active":"nav-link "} href="/blog-v2" data-toggle="dropdown">
|
||||
Blogs
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
);
|
||||
// End navbar nav mega menu main
|
||||
};
|
||||
|
||||
export default MegaMenu;
|
||||
@@ -0,0 +1,158 @@
|
||||
'use client'
|
||||
|
||||
import React from "react";
|
||||
import Link from "next/link";
|
||||
import Image from "next/image";
|
||||
const HomeDropdown = [
|
||||
{
|
||||
img: "home01",
|
||||
routerPath: "/",
|
||||
inenerText: "",
|
||||
inenerTextWrapClass: "",
|
||||
clasName: `dropdown-item img-box`,
|
||||
title: "Event Organizer",
|
||||
},
|
||||
{
|
||||
img: "home02",
|
||||
routerPath: "/doc-landing",
|
||||
inenerText: "",
|
||||
inenerTextWrapClass: "",
|
||||
clasName: `dropdown-item img-box`,
|
||||
title: "Doc Landing",
|
||||
},
|
||||
{
|
||||
img: "home03",
|
||||
routerPath: "/project-management",
|
||||
inenerText: "",
|
||||
inenerTextWrapClass: "",
|
||||
clasName: `dropdown-item img-box`,
|
||||
title: "Project Management",
|
||||
},
|
||||
{
|
||||
img: "home04",
|
||||
routerPath: "/customer-support",
|
||||
inenerText: "",
|
||||
inenerTextWrapClass: "",
|
||||
clasName: `dropdown-item img-box`,
|
||||
title: "Customer Support",
|
||||
},
|
||||
{
|
||||
img: "home05",
|
||||
routerPath: "/product-landing",
|
||||
inenerText: "",
|
||||
inenerTextWrapClass: "",
|
||||
clasName: `dropdown-item img-box`,
|
||||
title: "Product Landing",
|
||||
},
|
||||
{
|
||||
img: "home06",
|
||||
routerPath: "/product-landing-dark",
|
||||
inenerText: "",
|
||||
inenerTextWrapClass: "",
|
||||
clasName: `dropdown-item img-box`,
|
||||
title: "Product Landing Dark",
|
||||
},
|
||||
{
|
||||
img: "home07",
|
||||
routerPath: "/note-taking-landing",
|
||||
inenerText: "",
|
||||
inenerTextWrapClass: "",
|
||||
clasName: `dropdown-item img-box`,
|
||||
title: "Not Taking Landing",
|
||||
},
|
||||
{
|
||||
img: "home08",
|
||||
routerPath: "/video-editor-landing",
|
||||
inenerText: "",
|
||||
inenerTextWrapClass: "",
|
||||
clasName: `dropdown-item img-box`,
|
||||
title: "Video Editor Landing",
|
||||
},
|
||||
{
|
||||
img: "home10",
|
||||
routerPath: "/appointment-scheduling",
|
||||
inenerText: "",
|
||||
inenerTextWrapClass: "",
|
||||
clasName: `dropdown-item img-box`,
|
||||
title: "Appointment Scheduling",
|
||||
},
|
||||
{
|
||||
img: "home13",
|
||||
routerPath: "/website-builder",
|
||||
inenerText: "",
|
||||
inenerTextWrapClass: "",
|
||||
clasName: `dropdown-item img-box`,
|
||||
title: "Website Builder",
|
||||
},
|
||||
{
|
||||
img: "home11",
|
||||
routerPath: "/mobile-app-landing",
|
||||
inenerText: "",
|
||||
inenerTextWrapClass: "",
|
||||
clasName: `dropdown-item img-box`,
|
||||
title: "Mobile App Landing",
|
||||
},
|
||||
{
|
||||
img: "home12",
|
||||
routerPath: "/doc-signature",
|
||||
inenerText: "",
|
||||
inenerTextWrapClass: "",
|
||||
clasName: `dropdown-item img-box`,
|
||||
title: "Doc Signature",
|
||||
},
|
||||
{
|
||||
img: "home14",
|
||||
routerPath: "/form-survey-landing",
|
||||
inenerText: "",
|
||||
inenerTextWrapClass: "",
|
||||
clasName: `dropdown-item img-box`,
|
||||
title: "Form Survey",
|
||||
},
|
||||
{
|
||||
img: "home16",
|
||||
routerPath: "/vr-landing",
|
||||
inenerText: "",
|
||||
inenerTextWrapClass: "",
|
||||
clasName: `dropdown-item img-box`,
|
||||
title: "VR Landing",
|
||||
},
|
||||
|
||||
{
|
||||
img: "home09",
|
||||
routerPath: "/coming-soon",
|
||||
inenerText: "",
|
||||
inenerTextWrapClass: "",
|
||||
clasName: `dropdown-item img-box`,
|
||||
title: "Coming Soon",
|
||||
},
|
||||
{
|
||||
img: "home15",
|
||||
routerPath: "/e-commerce",
|
||||
inenerText: "",
|
||||
inenerTextWrapClass: "",
|
||||
clasName: `dropdown-item img-box`,
|
||||
title: "E-commerce",
|
||||
},
|
||||
];
|
||||
import { usePathname } from "next/navigation";
|
||||
const MegaMenuLanding = () => {
|
||||
const pathname = usePathname();
|
||||
return (
|
||||
<ul className="mega-menu d-flex " style={{maxHeight:'calc(100vh - 100px)',overflowY:'scroll'}}>
|
||||
{HomeDropdown.map((val, i) => (
|
||||
<li key={i}>
|
||||
<Link href={val.routerPath} className={val.clasName}>
|
||||
<Image width={990} height={890} style={{width:'100%',height:'fit-content'}} src={`/images/menu/${val.img}.png`} alt="home-demo" />
|
||||
<span className={pathname == val.routerPath ? "font-rubik activeMenu" : 'font-rubik'}>{val.title}</span>
|
||||
<div className={val.inenerTextWrapClass}>
|
||||
<div className="font-rubik">{val.inenerText}</div>
|
||||
</div>
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
);
|
||||
// End navbar nav mega menu main
|
||||
};
|
||||
|
||||
export default MegaMenuLanding;
|
||||
@@ -0,0 +1,327 @@
|
||||
'use client'
|
||||
|
||||
import React, { useState } from "react";
|
||||
import Link from "next/link";
|
||||
|
||||
import Image from "next/image";
|
||||
|
||||
const HomeMobileMenu = [
|
||||
{
|
||||
label: "Event Organiser",
|
||||
href: "/",
|
||||
},
|
||||
{
|
||||
label: "Project Management",
|
||||
href: "/project-management",
|
||||
},
|
||||
{
|
||||
label: "Customer Support",
|
||||
href: "/customer-support",
|
||||
},
|
||||
{
|
||||
label: "Doc landing",
|
||||
href: "/doc-landing",
|
||||
},
|
||||
{
|
||||
label: "Product landing",
|
||||
href: "/product-landing",
|
||||
},
|
||||
{
|
||||
label: "Product landing Dark",
|
||||
href: "/product-landing-dark",
|
||||
},
|
||||
{
|
||||
label: "Note Taking App landing",
|
||||
href: "/note-taking-landing",
|
||||
},
|
||||
{
|
||||
label: "Video Editor Landing",
|
||||
href: "/video-editor-landing",
|
||||
},
|
||||
{
|
||||
label: "Appointment Scheduling",
|
||||
href: "/appointment-scheduling",
|
||||
},
|
||||
{
|
||||
label: "Mobile App",
|
||||
href: "/mobile-app-landing",
|
||||
},
|
||||
{
|
||||
label: "Doc Signature",
|
||||
href: "/doc-signature",
|
||||
},
|
||||
{
|
||||
label: "Website Builder",
|
||||
href: "/website-builder",
|
||||
},
|
||||
{
|
||||
label: "Form Survey",
|
||||
href: "/form-survey-landing",
|
||||
},
|
||||
{
|
||||
label: "VR Landing",
|
||||
href: "/vr-landing",
|
||||
},
|
||||
{
|
||||
label: "E-Commerce",
|
||||
href: "/e-commerce",
|
||||
},
|
||||
{
|
||||
label: "Coming Soon",
|
||||
href: "/coming-soon",
|
||||
},
|
||||
];
|
||||
|
||||
const Pricing = [
|
||||
{
|
||||
label: "Customer Support",
|
||||
href: "/pricing-cs",
|
||||
},
|
||||
{
|
||||
label: "Event Organiser",
|
||||
href: "/pricing-eo",
|
||||
},
|
||||
{
|
||||
label: "Project Management",
|
||||
href: "/pricing-pm",
|
||||
},
|
||||
];
|
||||
const AboutUs = [
|
||||
{
|
||||
label: "Customer Support",
|
||||
href: "/about-cs",
|
||||
},
|
||||
{
|
||||
label: "Event Organiser",
|
||||
href: "/about-eo",
|
||||
},
|
||||
{
|
||||
label: "Project Management",
|
||||
href: "/about-pm",
|
||||
},
|
||||
{
|
||||
label: "Documentation",
|
||||
href: "/about-doc",
|
||||
},
|
||||
];
|
||||
const ContactUs = [
|
||||
{
|
||||
label: "Custom Support",
|
||||
href: "/contact-cs",
|
||||
},
|
||||
{
|
||||
label: "Event Organizer",
|
||||
href: "/contact-eo",
|
||||
},
|
||||
{
|
||||
label: "Project Management",
|
||||
href: "/contact-pm",
|
||||
},
|
||||
{
|
||||
label: "Documentation",
|
||||
href: "/contact-doc",
|
||||
},
|
||||
];
|
||||
const Team = [
|
||||
{
|
||||
label: "Team Version 01",
|
||||
href: "/team-1",
|
||||
},
|
||||
{
|
||||
label: "Team Version 02",
|
||||
href: "/team-2",
|
||||
},
|
||||
{
|
||||
label: "Team Version 03",
|
||||
href: "/team-3",
|
||||
},
|
||||
{
|
||||
label: "Team Version 04",
|
||||
href: "/team-4",
|
||||
},
|
||||
{
|
||||
label: "Team Version 05",
|
||||
href: "/team-5",
|
||||
},
|
||||
{
|
||||
label: "Team Version 06",
|
||||
href: "/team-6",
|
||||
},
|
||||
{
|
||||
label: "Team Details",
|
||||
href: "/teams/1",
|
||||
},
|
||||
{
|
||||
label: "Team Details Slider",
|
||||
href: "/team-details-v2/1",
|
||||
},
|
||||
];
|
||||
const Services = [
|
||||
{
|
||||
label: "Service Version 01",
|
||||
href: "/service-v1",
|
||||
},
|
||||
{
|
||||
label: "Service Version 02",
|
||||
href: "/service-v2",
|
||||
},
|
||||
{
|
||||
label: "Service Version 03",
|
||||
href: "/service-v3",
|
||||
},
|
||||
{
|
||||
label: "Service Version 04",
|
||||
href: "/service-v4",
|
||||
},
|
||||
{
|
||||
label: "Service Details",
|
||||
href: "/services/3",
|
||||
},
|
||||
];
|
||||
const Miscellaneous = [
|
||||
{
|
||||
label: "Terms & Condition)",
|
||||
href: "/terms-conditions",
|
||||
},
|
||||
{
|
||||
label: "Login",
|
||||
href: "/login",
|
||||
},
|
||||
{
|
||||
label: "Signup",
|
||||
href: "/signup",
|
||||
},
|
||||
{
|
||||
label: "404",
|
||||
href: "/not-found",
|
||||
},
|
||||
];
|
||||
const Portfolio = [
|
||||
{
|
||||
label: "Classic Style",
|
||||
href: "/classic-style",
|
||||
},
|
||||
{
|
||||
label: "Grid 2 Columns",
|
||||
href: "/grid-two-col",
|
||||
},
|
||||
{
|
||||
label: "Grid 3 Columns",
|
||||
href: "/grid-three-col",
|
||||
},
|
||||
{
|
||||
label: "Gallery Slider",
|
||||
href: "/gallery-slider",
|
||||
},
|
||||
{
|
||||
label: "Grid Single",
|
||||
href: "/grid-single",
|
||||
},
|
||||
{
|
||||
label: "Classic Details",
|
||||
href: "/portfolios/2",
|
||||
},
|
||||
];
|
||||
const Blogs = [
|
||||
{
|
||||
label: "Blog Version 01",
|
||||
href: "/blog-v1",
|
||||
},
|
||||
{
|
||||
label: "Blog Version 02",
|
||||
href: "/blog-v2",
|
||||
},
|
||||
{
|
||||
label: "Blog Version 03",
|
||||
href: "/blog-v3",
|
||||
},
|
||||
{
|
||||
label: "Blog Version 04",
|
||||
href: "/blog-v4",
|
||||
},
|
||||
{
|
||||
label: "Blog Version 05",
|
||||
href: "/blog-v5",
|
||||
},
|
||||
{
|
||||
label: "Blog Version 06",
|
||||
href: "/blog-v6",
|
||||
},
|
||||
{
|
||||
label: "Blog Details",
|
||||
href: "/blogs/3",
|
||||
},
|
||||
];
|
||||
const Docs = [
|
||||
{
|
||||
label: "Full Width",
|
||||
href: "/doc-full-width",
|
||||
},
|
||||
{
|
||||
label: "Full Width Banner",
|
||||
href: "/doc-full-width-banner",
|
||||
},
|
||||
{
|
||||
label: "Doc Box",
|
||||
href: "/doc-box",
|
||||
},
|
||||
{
|
||||
label: "Doc Box With Banner",
|
||||
href: "/doc-box-with-banner",
|
||||
},
|
||||
{
|
||||
label: "Changelog",
|
||||
href: "/changelog",
|
||||
},
|
||||
];
|
||||
import { usePathname } from "next/navigation";
|
||||
import MenuLinkTwo from "./MenuLinkTwo";
|
||||
import MobileMenuTwo from "../MobileMenuTwo";
|
||||
const MegaMenuMobile = () => {
|
||||
const [click, setClick] = useState(false);
|
||||
const handleClick = () => setClick(!click);
|
||||
|
||||
|
||||
return (
|
||||
<div className={`mega-menu-wrapper ${click ? 'active':''}`} style={{position:'fixed',top:'0px',left:'0px'}} >
|
||||
<div className="mega-swicher"></div>
|
||||
<div className="mob-header multi-mob-header">
|
||||
<button className="toggler-menu" onClick={handleClick}>
|
||||
<div className={click ? "active" : ""}>
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
{/* End Header */}
|
||||
|
||||
<div
|
||||
style={{background:'#17192B',height:'100vh'}}
|
||||
|
||||
className={click ? "mega-mobile-menu menu-open wrapper-two-menu active" : "mega-mobile-menu wrapper-two-menu"}
|
||||
|
||||
|
||||
>
|
||||
<div>
|
||||
<div className="logo position-static" style={{paddingTop:'40px',paddingLeft:'16px'}} >
|
||||
<Link href="/">
|
||||
<Image width="137" height="34" src="/images/logo/deski_07.svg" alt="home-demo" />
|
||||
</Link>
|
||||
</div>
|
||||
<div className="fix-icon text-dark" onClick={handleClick}>
|
||||
<Image width="14" height="15" src="/images/icon/close-w.svg" alt="icon" />
|
||||
</div>
|
||||
{/* Mobile Menu close icon */}
|
||||
|
||||
{/* End logo */}
|
||||
</div>
|
||||
<div style={{background:'#17192B',}} >
|
||||
<MobileMenuTwo/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default MegaMenuMobile;
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
'use client'
|
||||
import Link from "next/link";
|
||||
import React, { useEffect } from 'react'
|
||||
import { usePathname } from "next/navigation";
|
||||
export default function MenuLink({val,setCurrentTopRoute,topMenu}) {
|
||||
const pathname = usePathname();
|
||||
useEffect(() => {
|
||||
if (pathname.split('/')[1] == val.routerPath.split('/')[1]) {
|
||||
setCurrentTopRoute(topMenu)
|
||||
|
||||
}
|
||||
|
||||
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<li >
|
||||
<Link href={val.routerPath} className={pathname.split('/')[1] == val.routerPath.split('/')[1] ? "dropdown-item active":'dropdown-item'}>
|
||||
{val.name}
|
||||
</Link>
|
||||
</li>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
'use client'
|
||||
import Link from "next/link";
|
||||
import React, { useEffect } from 'react'
|
||||
import { usePathname } from "next/navigation";
|
||||
|
||||
export default function MenuLinkTwo({val,setCurrentTopRoute,topMenu}) {
|
||||
const pathname = usePathname();
|
||||
useEffect(() => {
|
||||
if (pathname.split('/')[1] == val.routerPath.split('/')[1]) {
|
||||
setCurrentTopRoute(topMenu)
|
||||
|
||||
}
|
||||
|
||||
|
||||
}, [])
|
||||
return (
|
||||
<Link href={val.routerPath} className={pathname.split('/')[1] == val.routerPath.split('/')[1] ? "dropdown-item activeMenu":'dropdown-item'}>
|
||||
{val.name}
|
||||
</Link>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user