AdminDashboardSidebar.js 2.17 KB
import Image from 'next/image';
import { useRouter } from 'next/router';
import React, { useState } from 'react';

const Sidebar = () => {
    const router = useRouter();

    const [collapsed, setCollapsed] = useState(false);

    const toggleSidebar = () => {
        setCollapsed(!collapsed);
    };

    return (
        <div className={`sidebar ${collapsed ? 'collapsed' : ''}`}>
            {/* <button className="toggle-btn" onClick={toggleSidebar}>
        Toggle Sidebar
      </button> */}
            <ul>
                {/* <li className={router.pathname === "/admin/orders" ? "active" : ""}>
                    <a href="/admin/orders">
                        <Image alt="" width={22} height={15} src="/images/vendor/icon-orders.svg" />
                        <span>Orders</span>
                    </a>
                </li> */}
                <li className={router.pathname === "/admin/activities" ? "active" : ""}>
                    <a href="/admin/activities">
                        <Image alt="" width={22} height={15} src="/images/vendor/icon-activities.svg" />
                        <span>Activities</span>
                    </a>
                </li>
                <li className={router.pathname === "/admin/vendors" ? "active" : ""}>
                    <a href="/admin/vendors">
                        <Image alt="" width={22} height={15} src="/images/admin/icon-user.svg" />
                        <span>Vendor</span>
                    </a>
                </li>
                <li className={router.pathname === "/admin/giftcards" ? "active" : ""}>
                    <a href="/admin/giftcards">
                        <Image alt="" width={22} height={15} src="/images/admin/icon-gift.svg" />
                        <span>Gift Card</span>
                    </a>
                </li>
                <li className={router.pathname === "/admin/reviews" ? "active" : ""}>
                    <a href="/admin/reviews">
                        <Image alt="" width={22} height={15} src="/images/admin/icon-gift.svg" />
                        <span>Reviews</span>
                    </a>
                </li>
            </ul>
        </div>
    );
};

export default Sidebar;