plane/web/components/issues/issue-layouts/list/blocks-list.tsx
Dakshesh Jain ad558833af
refactor: archive issue (#2628)
* dev: archived issue store

* dev: archived issue layouts and store binding

* dev: archived issue detail store

* dev: is read only

* fix: archived issue delete

* fix: build error
2023-11-03 20:20:05 +05:30

41 lines
1.2 KiB
TypeScript

import { FC } from "react";
// components
import { IssueBlock } from "components/issues";
// types
import { IIssue } from "types";
interface Props {
columnId: string;
issues: IIssue[];
isReadonly?: boolean;
handleIssues: (group_by: string | null, issue: IIssue, action: "update" | "delete") => void;
quickActions: (group_by: string | null, issue: IIssue) => React.ReactNode;
display_properties: any;
showEmptyGroup?: boolean;
}
export const IssueBlocksList: FC<Props> = (props) => {
const { columnId, issues, handleIssues, quickActions, display_properties, showEmptyGroup, isReadonly } = props;
return (
<div className="w-full h-full relative divide-y-[0.5px] divide-custom-border-200">
{issues && issues.length > 0 ? (
issues.map((issue) => (
<IssueBlock
key={issue.id}
columnId={columnId}
issue={issue}
handleIssues={handleIssues}
quickActions={quickActions}
isReadonly={isReadonly}
display_properties={display_properties}
showEmptyGroup={showEmptyGroup}
/>
))
) : (
<div className="bg-custom-background-100 text-custom-text-400 text-sm p-3">No issues</div>
)}
</div>
);
};