forked from github/plane
3d09a69d58
* fix: eslint fixes --------- Co-authored-by: gurusainath <gurusainath007@gmail.com>
34 lines
825 B
TypeScript
34 lines
825 B
TypeScript
import { FC } from "react";
|
|
import { observer } from "mobx-react-lite";
|
|
// hooks
|
|
import { useIssueDetail } from "hooks/store";
|
|
// components
|
|
import { IssueActivityList } from "./activity-list";
|
|
|
|
type TIssueActivityRoot = {
|
|
issueId: string;
|
|
};
|
|
|
|
export const IssueActivityRoot: FC<TIssueActivityRoot> = observer((props) => {
|
|
const { issueId } = props;
|
|
// hooks
|
|
const {
|
|
activity: { getActivitiesByIssueId },
|
|
} = useIssueDetail();
|
|
|
|
const activityIds = getActivitiesByIssueId(issueId);
|
|
|
|
if (!activityIds) return <></>;
|
|
return (
|
|
<div>
|
|
{activityIds.map((activityId, index) => (
|
|
<IssueActivityList
|
|
key={activityId}
|
|
activityId={activityId}
|
|
ends={index === 0 ? "top" : index === activityIds.length - 1 ? "bottom" : undefined}
|
|
/>
|
|
))}
|
|
</div>
|
|
);
|
|
});
|