import { observer } from "mobx-react"; import { Tab } from "@headlessui/react"; import { TIssuesListTypes } from "@plane/types"; // helpers import { EDurationFilters, FILTERED_ISSUES_TABS_LIST, UNFILTERED_ISSUES_TABS_LIST } from "@/constants/dashboard"; import { cn } from "@/helpers/common.helper"; // types // constants type Props = { durationFilter: EDurationFilters; selectedTab: TIssuesListTypes; }; export const TabsList: React.FC = observer((props) => { const { durationFilter, selectedTab } = props; const tabsList = durationFilter === "none" ? UNFILTERED_ISSUES_TABS_LIST : FILTERED_ISSUES_TABS_LIST; const selectedTabIndex = tabsList.findIndex((tab) => tab.key === selectedTab); return (
{tabsList.map((tab) => ( {tab.label} ))} ); });