mirror of
https://github.com/eliasstepanik/core.git
synced 2026-01-11 18:18:27 +00:00
* Feat: added integration connect and mcp oAuth * Feat: add mcp support to chat * Fix: UI for integrations and logs * Fix: ui * Fix: proxy server * Feat: enhance MCP tool integration and loading functionality * Fix: added header * Fix: Linear integration sync --------- Co-authored-by: Manoj K <saimanoj58@gmail.com>
54 lines
1.4 KiB
TypeScript
54 lines
1.4 KiB
TypeScript
import { cn } from "~/lib/utils";
|
|
import {
|
|
SidebarGroup,
|
|
SidebarGroupContent,
|
|
SidebarMenu,
|
|
SidebarMenuButton,
|
|
SidebarMenuItem,
|
|
} from "../ui/sidebar";
|
|
import { useLocation, useNavigate } from "@remix-run/react";
|
|
import { Button } from "../ui";
|
|
|
|
export const NavMain = ({
|
|
items,
|
|
}: {
|
|
items: {
|
|
title: string;
|
|
url: string;
|
|
icon?: any;
|
|
}[];
|
|
}) => {
|
|
const location = useLocation();
|
|
const navigate = useNavigate();
|
|
|
|
return (
|
|
<SidebarGroup>
|
|
<SidebarGroupContent className="flex flex-col gap-2">
|
|
<SidebarMenu className="gap-0.5">
|
|
{items.map((item) => (
|
|
<SidebarMenuItem key={item.title}>
|
|
<Button
|
|
isActive={location.pathname.includes(item.url)}
|
|
className={cn(
|
|
"bg-grayAlpha-100 text-foreground w-fit gap-1 !rounded-md",
|
|
location.pathname.includes(item.url) &&
|
|
"!bg-accent !text-accent-foreground",
|
|
)}
|
|
onClick={() =>
|
|
navigate(
|
|
item.url.includes("/logs") ? `${item.url}/all` : item.url,
|
|
)
|
|
}
|
|
variant="ghost"
|
|
>
|
|
{item.icon && <item.icon size={16} />}
|
|
{item.title}
|
|
</Button>
|
|
</SidebarMenuItem>
|
|
))}
|
|
</SidebarMenu>
|
|
</SidebarGroupContent>
|
|
</SidebarGroup>
|
|
);
|
|
};
|