2024-05-14 20:55:38 +00:00
|
|
|
"use client";
|
2023-08-11 11:48:33 +00:00
|
|
|
// mobx react lite
|
|
|
|
import { observer } from "mobx-react-lite";
|
2024-05-14 08:56:54 +00:00
|
|
|
// ui
|
2023-11-06 15:13:34 +00:00
|
|
|
import { StateGroupIcon } from "@plane/ui";
|
2024-05-14 08:56:54 +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
|
|
|
// interfaces
|
|
|
|
import { IIssueState } from "@/types/issue";
|
2023-08-11 11:48:33 +00:00
|
|
|
|
2023-12-05 11:56:57 +00:00
|
|
|
export const IssueKanBanHeader = 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);
|
|
|
|
|
|
|
|
if (stateGroup === null) return <></>;
|
|
|
|
|
|
|
|
return (
|
2023-12-10 10:18:10 +00:00
|
|
|
<div className="flex items-center gap-2 px-2 pb-2">
|
|
|
|
<div className="flex h-3.5 w-3.5 flex-shrink-0 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 truncate font-semibold capitalize text-custom-text-200">{state?.name}</div>
|
2024-05-14 20:55:38 +00:00
|
|
|
{/* <span className="flex-shrink-0 rounded-full text-custom-text-300">{getCountOfIssuesByState(state.id)}</span> */}
|
2023-08-11 11:48:33 +00:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
});
|