IssueResponse definition and implementation

This commit is contained in:
Oliver Bryan
2025-12-14 22:13:30 +00:00
parent c22d38e2ae
commit 36b39da1bd
5 changed files with 43 additions and 25 deletions

View File

@@ -1,22 +1,22 @@
import type { IssueRecord, ProjectRecord } from "@issue/shared";
import type { IssueResponse, ProjectRecord } from "@issue/shared";
import { X } from "lucide-react";
import { Button } from "@/components/ui/button";
import { issueID } from "@/lib/utils";
export function IssueDetailPane({
project,
issue,
issueData,
close,
}: {
project: ProjectRecord;
issue: IssueRecord;
issueData: IssueResponse;
close: () => void;
}) {
return (
<div className="flex flex-col">
<div className="flex flex-row items-center justify-end border-b">
<span className="w-full px-0.5">
<p className="text-sm w-fit px-0.75">{issueID(project.blob, issue.number)}</p>
<p className="text-sm w-fit px-0.75">{issueID(project.blob, issueData.Issue.number)}</p>
</span>
<Button variant={"dummy"} onClick={close} className="px-0 py-0 w-6 h-6">
@@ -25,8 +25,13 @@ export function IssueDetailPane({
</div>
<div className="flex flex-col w-full p-2 gap-2">
<h1 className="text-md">{issue.title}</h1>
<p className="text-sm">{issue.description}</p>
<h1 className="text-md">{issueData.Issue.title}</h1>
<p className="text-sm">{issueData.Issue.description}</p>
<p className="text-sm">
Assignee:{" "}
{issueData.User ? `${issueData.User.name} (${issueData.User.username})` : "Unassigned"}
</p>
</div>
</div>
);