import { FC } from "react"; import Link from "next/link"; // types import { TPageNavigationTabs } from "@plane/types"; // helpers import { cn } from "@/helpers/common.helper"; type TPageTabNavigation = { workspaceSlug: string; projectId: string; pageType: TPageNavigationTabs; }; // pages tab options const pageTabs: { key: TPageNavigationTabs; label: string }[] = [ { key: "public", label: "Public", }, { key: "private", label: "Private", }, { key: "archived", label: "Archived", }, ]; export const PageTabNavigation: FC = (props) => { const { workspaceSlug, projectId, pageType } = props; const handleTabClick = (e: React.MouseEvent, tabKey: TPageNavigationTabs) => { if (tabKey === pageType) e.preventDefault(); }; return (
{pageTabs.map((tab) => ( handleTabClick(e, tab.key)} > {tab.label}
))}
); };