- Extract AppSidebar, TabBar, TabLink into dashboard _components - Add tab-store for browser-like tab navigation state - Move StatusIcon/PriorityIcon to issues/_components, config to _config - Replace inline CreateIssueForm with Dialog (status/priority selection) - Add calendar component to packages/ui - Simplify dashboard layout with SidebarProvider Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
30 lines
606 B
TypeScript
30 lines
606 B
TypeScript
"use client";
|
|
|
|
import Link from "next/link";
|
|
import { useTabStore } from "../../../lib/tab-store";
|
|
|
|
export function TabLink({
|
|
href,
|
|
title,
|
|
iconKey,
|
|
children,
|
|
...props
|
|
}: {
|
|
href: string;
|
|
title: string;
|
|
iconKey?: string;
|
|
children: React.ReactNode;
|
|
} & Omit<React.ComponentProps<typeof Link>, "onClick" | "href">) {
|
|
const { openTab } = useTabStore();
|
|
|
|
const handleClick = (e: React.MouseEvent) => {
|
|
e.preventDefault();
|
|
openTab(href, title, { replace: false, iconKey });
|
|
};
|
|
|
|
return (
|
|
<Link href={href} onClick={handleClick} {...props}>
|
|
{children}
|
|
</Link>
|
|
);
|
|
}
|