chore: issue comment empty state added (#4202)

This commit is contained in:
Anmol Singh Bhatia 2024-04-16 13:22:27 +05:30 committed by GitHub
parent 18b573531f
commit 0a6d7713fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 23 additions and 13 deletions

View File

@ -1,5 +1,9 @@
import { FC } from "react";
import { observer } from "mobx-react-lite";
// components
import { EmptyState } from "@/components/empty-state";
// hooks
import { EmptyStateType } from "@/constants/empty-state";
// hooks
import { useIssueDetail } from "@/hooks/store";
// components
@ -28,18 +32,24 @@ export const IssueCommentRoot: FC<TIssueCommentRoot> = observer((props) => {
return (
<div>
{commentIds.map((commentId, index) => (
<IssueCommentCard
projectId={projectId}
key={commentId}
workspaceSlug={workspaceSlug}
commentId={commentId}
ends={index === 0 ? "top" : index === commentIds.length - 1 ? "bottom" : undefined}
activityOperations={activityOperations}
showAccessSpecifier={showAccessSpecifier}
disabled={disabled}
/>
))}
{commentIds.length > 0 ? (
commentIds.map((commentId, index) => (
<IssueCommentCard
projectId={projectId}
key={commentId}
workspaceSlug={workspaceSlug}
commentId={commentId}
ends={index === 0 ? "top" : index === commentIds.length - 1 ? "bottom" : undefined}
activityOperations={activityOperations}
showAccessSpecifier={showAccessSpecifier}
disabled={disabled}
/>
))
) : (
<div className="flex items-center justify-center py-9">
<EmptyState type={EmptyStateType.ISSUE_COMMENT_EMPTY_STATE} layout="screen-simple" />
</div>
)}
</div>
);
});

View File

@ -532,7 +532,7 @@ const emptyStateDetails = {
[EmptyStateType.ISSUE_COMMENT_EMPTY_STATE]: {
key: EmptyStateType.ISSUE_COMMENT_EMPTY_STATE,
title: "No comments yet",
description: "Comments can be used as a discussion and follow-up space for the issues",
description: "Comments can be used as a discussion and \n follow-up space for the issues",
path: "/empty-state/search/comments",
},