// PEP-44/46: what the PM needs to review a story — the preview stand of its PR, the diff, // the screenshots taken by CI, and the Gitea issue it came from. import { Eye, FileDiff, CircleDot } from "lucide-react"; import type { ReviewPreview as Preview } from "@peppa/core"; import { PanelSection } from "@/components/ActivityAside"; export function ReviewPreview({ preview }: { preview: Preview }) { if (!preview.previewUrl && !preview.diffUrl && !preview.issueUrl) return null; return (
{preview.previewUrl ? ( Посмотреть{preview.sha && {preview.sha.slice(0, 7)}} ) : ( preview.diffUrl && Стенда PR ещё нет (деплой превью не настроен или не прошёл). )} {preview.diffUrl && ( Дифф )} {preview.issueUrl && ( Issue в Gitea )}
{preview.releaseId != null && preview.screenshots.length > 0 && (
{preview.screenshots.map((s) => { const src = `/api/releases/${preview.releaseId}/shots/${s.n}`; return ( {/* eslint-disable-next-line @next/next/no-img-element */} {`Скриншот {s.path} ); })}
)}
); }