2023-08-11 11:48:33 +00:00
|
|
|
"use client";
|
|
|
|
|
|
|
|
// mobx react lite
|
|
|
|
import { observer } from "mobx-react-lite";
|
|
|
|
// interfaces
|
2023-08-30 15:03:21 +00:00
|
|
|
import { IIssueState } from "types/issue";
|
2023-08-11 11:48:33 +00:00
|
|
|
// constants
|
|
|
|
import { issueGroupFilter } from "constants/data";
|
|
|
|
// mobx hook
|
|
|
|
import { useMobxStore } from "lib/mobx/store-provider";
|
|
|
|
import { RootStore } from "store/root";
|
|
|
|
|
|
|
|
export const IssueListHeader = observer(({ state }: { state: IIssueState }) => {
|
|
|
|
const store: RootStore = useMobxStore();
|
|
|
|
|
|
|
|
const stateGroup = issueGroupFilter(state.group);
|
|
|
|
|
|
|
|
if (stateGroup === null) return <></>;
|
|
|
|
|
|
|
|
return (
|
2023-08-30 07:19:15 +00:00
|
|
|
<div className="pb-3 flex items-center">
|
2023-08-11 11:48:33 +00:00
|
|
|
<div className="w-[28px] h-[28px] flex justify-center items-center">
|
|
|
|
<stateGroup.icon />
|
|
|
|
</div>
|
2023-08-30 07:19:15 +00:00
|
|
|
<div className="font-semibold text-base capitalize ml-2 mr-3">{state?.name}</div>
|
|
|
|
<div className="text-gray-700 w-full max-w-[26px] h-[20px] flex justify-center items-center rounded-full">
|
2023-08-30 15:03:21 +00:00
|
|
|
{/* {store.issue.getCountOfIssuesByState(state.id)} */}
|
2023-08-11 11:48:33 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
});
|