mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
28 lines
828 B
TypeScript
28 lines
828 B
TypeScript
|
import { FC } from "react";
|
||
|
import { observer } from "mobx-react";
|
||
|
// hooks
|
||
|
import { useInboxIssues } from "hooks/store";
|
||
|
// components
|
||
|
import { InboxIssueListItem } from "../";
|
||
|
|
||
|
type TInboxIssueList = { workspaceSlug: string; projectId: string; inboxId: string };
|
||
|
|
||
|
export const InboxIssueList: FC<TInboxIssueList> = observer((props) => {
|
||
|
const { workspaceSlug, projectId, inboxId } = props;
|
||
|
// hooks
|
||
|
const {
|
||
|
issues: { getInboxIssuesByInboxId },
|
||
|
} = useInboxIssues();
|
||
|
|
||
|
const inboxIssueIds = getInboxIssuesByInboxId(inboxId);
|
||
|
|
||
|
if (!inboxIssueIds) return <></>;
|
||
|
return (
|
||
|
<div className="overflow-y-auto w-full h-full">
|
||
|
{inboxIssueIds.map((issueId) => (
|
||
|
<InboxIssueListItem workspaceSlug={workspaceSlug} projectId={projectId} inboxId={inboxId} issueId={issueId} />
|
||
|
))}
|
||
|
</div>
|
||
|
);
|
||
|
});
|