"use client"; import { FC } from "react"; import { observer } from "mobx-react-lite"; // components import { IssueKanBanBlock } from "@/components/issues/board-views/kanban/block"; import { IssueKanBanHeader } from "@/components/issues/board-views/kanban/header"; // ui import { Icon } from "@/components/ui"; // mobx hook import { useIssue } from "@/hooks/store"; // interfaces import { IIssueState, IIssue } from "@/types/issue"; type IssueKanbanViewProps = { workspaceSlug: string; projectId: string; }; export const IssueKanbanView: FC = observer((props) => { const { workspaceSlug, projectId } = props; // store hooks const { states, getFilteredIssuesByState } = useIssue(); return (
{states && states.length > 0 && states.map((_state: IIssueState) => (
{getFilteredIssuesByState(_state.id) && getFilteredIssuesByState(_state.id).length > 0 ? (
{getFilteredIssuesByState(_state.id).map((_issue: IIssue) => ( ))}
) : (
No issues in this state
)}
))}
); });