VendorDashboardSidebar.js
2.39 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import Image from "next/image";
import Link from "next/link";
import { useRouter } from "next/router";
import React, { useState } from "react";
import { ToastContainer } from "react-toastify";
import "react-toastify/dist/ReactToastify.css";
const Sidebar = () => {
const router = useRouter();
const [collapsed, setCollapsed] = useState(false);
const toggleSidebar = () => {
setCollapsed(!collapsed);
};
return (
<div className={`sidebar ${collapsed ? "collapsed" : ""}`}>
<ToastContainer position="bottom-right"></ToastContainer>
{/* <button className="toggle-btn" onClick={toggleSidebar}>
Toggle Sidebar
</button> */}
<ul>
<li className={router.pathname === "/vendor/dashboard" ? "active" : ""}>
<Link prefetch href="/vendor/dashboard">
<span className="d-flex cursor-pointer">
<Image className="" alt="" width={22} height={15} src="/images/vendor/icon-dashboard.svg" />
<div className="mx-2 text-center">
Dashboard
</div>
</span>
</Link>
</li>
<li className={router.pathname === "/vendor/enquiries" ? "active" : ""}>
<Link prefetch href="/vendor/enquiries">
<span className="d-flex cursor-pointer">
<Image alt="" width={22} height={15} src="/images/vendor/icon-orders.svg" />
<div className="mx-2 text-center">
Enquiries
</div>
</span>
</Link>
</li>
<li className={router.pathname === "/vendor/activities" ? "active" : ""}>
<Link prefetch href="/vendor/activities">
<span className="d-flex cursor-pointer">
<Image alt="" width={22} height={15} src="/images/vendor/icon-activities.svg" />
<div className="mx-2 text-center">
Activities
</div>
</span>
</Link>
</li>
<li className={router.pathname === "/vendor/reviews" ? "active" : ""}>
<Link prefetch href="/vendor/reviews">
<span className="d-flex cursor-pointer">
<Image alt="" width={22} height={15} src="/images/vendor/icon-orders.svg" />
<div className="mx-2 text-center">
Reviews
</div>
</span>
</Link>
</li>
</ul>
</div>
);
};
export default Sidebar;