-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMenu.jsx
30 lines (28 loc) · 838 Bytes
/
Menu.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"use client";
import React from "react";
import { usePathname } from "next/navigation";
import Link from "next/link";
import { menuItems } from "@/data/menu";
export default function Menu() {
const pathname = usePathname();
return (
<div className="col-xxl-1 d-xxl-block">
<div className="bostami-main-menu-wrap">
<nav className="bastami-main-menu main_menu">
<ul>
{menuItems.map((elm, i) => (
<li className={`${pathname == elm.href && "active"} `} key={i}>
<Link href={elm.href}>
<span>
<i style={{ fontSize: "25px" }} className={elm.icon}></i>
</span>
{elm.text}
</Link>
</li>
))}
</ul>
</nav>
</div>
</div>
);
}