2024-01-24 15:03:54 +00:00
|
|
|
import { FC } from "react";
|
|
|
|
import { observer } from "mobx-react";
|
|
|
|
// hooks
|
2024-03-19 14:38:35 +00:00
|
|
|
import { useInboxIssues } from "@/hooks/store";
|
2024-01-24 15:03:54 +00:00
|
|
|
// 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 (
|
2024-02-21 12:22:35 +00:00
|
|
|
<div className="overflow-y-auto w-full h-full vertical-scrollbar scrollbar-md">
|
2024-01-24 15:03:54 +00:00
|
|
|
{inboxIssueIds.map((issueId) => (
|
2024-03-06 13:09:14 +00:00
|
|
|
<InboxIssueListItem
|
|
|
|
key={issueId}
|
|
|
|
workspaceSlug={workspaceSlug}
|
|
|
|
projectId={projectId}
|
|
|
|
inboxId={inboxId}
|
|
|
|
issueId={issueId}
|
|
|
|
/>
|
2024-01-24 15:03:54 +00:00
|
|
|
))}
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
});
|