大改变

This commit is contained in:
YoRHa
2026-02-03 19:56:21 +08:00
parent 4b13d255bc
commit 9aa9e44295
545 changed files with 8712 additions and 16168 deletions

View File

@@ -1,17 +1,16 @@
"use client";
import Image from "next/image";
import { usePathname } from "next/navigation";
import { useState } from "react";
import NavItem from "./NavItem";
import { useApp } from "@/contexts/AppContext";
export default function Sidebar() {
const { t } = useApp();
const pathname = usePathname();
const [activeItem, setActiveItem] = useState("Assets");
const navigationItems = [
{ icon: "/icon-assets.svg", label: t("nav.assets"), key: "Assets", path: "/" },
{ icon: "/icon-lending.svg", label: t("nav.products"), key: "Products", path: "/product" },
{ icon: "/icon-alp.svg", label: t("nav.alp"), key: "ALP", path: "/alp" },
{ icon: "/icon-swap.svg", label: t("nav.swap"), key: "Swap", path: "/swap" },
{ icon: "/icon-lending.svg", label: t("nav.lending"), key: "Lending", path: "/lending" },
@@ -40,8 +39,8 @@ export default function Sidebar() {
key={item.key}
icon={item.icon}
label={item.label}
isActive={pathname === item.path}
href={item.path}
isActive={activeItem === item.key}
onClick={() => setActiveItem(item.key)}
/>
))}
</nav>