2024-05-14 20:55:38 +00:00
|
|
|
"use client";
|
2023-08-11 11:48:33 +00:00
|
|
|
import { observer } from "mobx-react-lite";
|
2023-11-06 15:13:34 +00:00
|
|
|
// ui
|
|
|
|
import { StateGroupIcon } from "@plane/ui";
|
2023-08-11 11:48:33 +00:00
|
|
|
// constants
|
2024-05-16 07:37:47 +00:00
|
|
|
import { issueGroupFilter } from "@/constants/issue";
|
2023-08-11 11:48:33 +00:00
|
|
|
// mobx hook
|
2024-05-14 20:55:38 +00:00
|
|
|
// import { useIssue } from "@/hooks/store";
|
2024-05-14 08:56:54 +00:00
|
|
|
// types
|
|
|
|
import { IIssueState } from "@/types/issue";
|
2023-08-11 11:48:33 +00:00
|
|
|
|
|
|
|
export const IssueListHeader = observer(({ state }: { state: IIssueState }) => {
|
2024-05-14 20:55:38 +00:00
|
|
|
// const { getCountOfIssuesByState } = useIssue();
|
2023-08-11 11:48:33 +00:00
|
|
|
const stateGroup = issueGroupFilter(state.group);
|
2024-05-14 20:55:38 +00:00
|
|
|
// const count = getCountOfIssuesByState(state.id);
|
2023-08-11 11:48:33 +00:00
|
|
|
|
|
|
|
if (stateGroup === null) return <></>;
|
|
|
|
|
|
|
|
return (
|
2023-12-10 10:18:10 +00:00
|
|
|
<div className="flex items-center gap-2 p-3">
|
|
|
|
<div className="flex h-3.5 w-3.5 items-center justify-center">
|
2023-11-06 15:13:34 +00:00
|
|
|
<StateGroupIcon stateGroup={state.group} color={state.color} height="14" width="14" />
|
2023-08-11 11:48:33 +00:00
|
|
|
</div>
|
2023-12-10 10:18:10 +00:00
|
|
|
<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> */}
|
2023-08-11 11:48:33 +00:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
});
|