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"; import useIsInIframe from "@/hooks/use-is-in-iframe"; // 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 isInIframe = useIsInIframe(); const comments = details[peekId || ""]?.comments || []; return (

Comments

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

Sign in to add your comment

))}
)}
); });