plane/space/components/issues/board-views/list/header.tsx

29 lines
985 B
TypeScript
Raw Normal View History

2024-05-14 20:55:38 +00:00
"use client";
import { observer } from "mobx-react-lite";
// ui
import { StateGroupIcon } from "@plane/ui";
// constants
2024-03-19 14:38:35 +00:00
import { issueGroupFilter } from "@/constants/data";
// mobx hook
2024-05-14 20:55:38 +00:00
// import { useIssue } from "@/hooks/store";
// types
import { IIssueState } from "@/types/issue";
export const IssueListHeader = observer(({ state }: { state: IIssueState }) => {
2024-05-14 20:55:38 +00:00
// const { getCountOfIssuesByState } = useIssue();
const stateGroup = issueGroupFilter(state.group);
2024-05-14 20:55:38 +00:00
// const count = getCountOfIssuesByState(state.id);
if (stateGroup === null) return <></>;
return (
<div className="flex items-center gap-2 p-3">
<div className="flex h-3.5 w-3.5 items-center justify-center">
<StateGroupIcon stateGroup={state.group} color={state.color} height="14" width="14" />
</div>
<div className="mr-1 font-medium capitalize">{state?.name}</div>
2024-05-14 20:55:38 +00:00
{/* <div className="text-sm font-medium text-custom-text-200">{count}</div> */}
</div>
);
});