import { useRouter } from "next/router"; import Link from "next/link"; import { AlertTriangle, CalendarDays, CheckCircle2, Clock, Copy, XCircle } from "lucide-react"; // ui import { Tooltip, PriorityIcon } from "@plane/ui"; // hooks import { useInboxIssues, useProject } from "hooks/store"; // helpers import { renderFormattedDate } from "helpers/date-time.helper"; // constants import { INBOX_STATUS } from "constants/inbox"; type Props = { active: boolean; issueId: string; }; export const InboxIssueCard: React.FC = (props) => { const { active } = props; // router const router = useRouter(); const { workspaceSlug, projectId, inboxId } = router.query; // store hooks const { getIssueById } = useInboxIssues(); const { getProjectById } = useProject(); // derived values const issue = getIssueById(inboxId as string, props.issueId); const issueStatus = issue?.issue_inbox[0].status; if (!issue) return null; return (

{getProjectById(issue.project_id)?.identifier}-{issue.sequence_id}

{issue.name}
{renderFormattedDate(issue.created_at ?? "")}
s.value === issueStatus)?.textColor }`} > {issueStatus === -2 ? ( <> Pending ) : issueStatus === -1 ? ( <> Declined ) : issueStatus === 0 ? ( <> {new Date(issue.issue_inbox[0].snoozed_till ?? "") < new Date() ? "Snoozed date passed" : "Snoozed"} ) : issueStatus === 1 ? ( <> Accepted ) : ( <> Duplicate )}
); };