import React from "react"; import { observer } from "mobx-react-lite"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { Button } from "@plane/ui"; // components import { CommentCard, AddComment } from "@/components/issues/peek-overview"; import { Icon } from "@/components/ui"; // hooks import { useIssueDetails, useProject, useUser } from "@/hooks/store"; // types import { IIssue } from "@/types/issue"; type Props = { issueDetails: IIssue; workspaceSlug: string; projectId: string; }; export const PeekOverviewIssueActivity: React.FC = observer((props) => { const { workspaceSlug, projectId } = props; // router const pathname = usePathname(); // store const { canComment } = useProject(); const { details, peekId } = useIssueDetails(); const { data: currentUser } = useUser(); const comments = details[peekId || ""]?.comments || []; return (

Activity

{workspaceSlug && (
{comments.map((comment: any) => ( ))}
{currentUser ? ( <> {canComment && (
)} ) : (

Sign in to add your comment

)}
)}
); });