2026-01-15 23:40:21 +08:00
|
|
|
"use client";
|
|
|
|
|
|
2026-01-19 00:00:35 +08:00
|
|
|
import { MessagesSquare } from "lucide-react";
|
2026-01-15 23:40:21 +08:00
|
|
|
import Link from "next/link";
|
|
|
|
|
import { usePathname } from "next/navigation";
|
|
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
SidebarGroup,
|
|
|
|
|
SidebarMenu,
|
|
|
|
|
SidebarMenuButton,
|
|
|
|
|
SidebarMenuItem,
|
|
|
|
|
} from "@/components/ui/sidebar";
|
2026-01-20 14:06:47 +08:00
|
|
|
import { useI18n } from "@/core/i18n/hooks";
|
2026-01-15 23:40:21 +08:00
|
|
|
|
|
|
|
|
export function WorkspaceNavMenu() {
|
2026-01-20 14:06:47 +08:00
|
|
|
const { t } = useI18n();
|
2026-01-15 23:40:21 +08:00
|
|
|
const pathname = usePathname();
|
|
|
|
|
return (
|
2026-01-19 00:00:35 +08:00
|
|
|
<SidebarGroup className="pt-1">
|
2026-01-15 23:40:21 +08:00
|
|
|
<SidebarMenu>
|
|
|
|
|
<SidebarMenuItem>
|
|
|
|
|
<SidebarMenuButton isActive={pathname === "/workspace/chats"} asChild>
|
|
|
|
|
<Link className="text-muted-foreground" href="/workspace/chats">
|
|
|
|
|
<MessagesSquare />
|
2026-01-20 14:06:47 +08:00
|
|
|
<span>{t.sidebar.chats}</span>
|
2026-01-15 23:40:21 +08:00
|
|
|
</Link>
|
|
|
|
|
</SidebarMenuButton>
|
|
|
|
|
</SidebarMenuItem>
|
|
|
|
|
</SidebarMenu>
|
|
|
|
|
</SidebarGroup>
|
|
|
|
|
);
|
|
|
|
|
}
|