| 1 | import { Icon } from "@/components/icon"; |
| 2 | import type { RatatuiCopy } from "@/lib/content/ratatui"; |
| 3 | import "./project-links.css"; |
| 4 | |
| 5 | const REPOSITORY = "https://github.com/codewhale-hq/codewhale-ratatui"; |
| 6 | |
| 7 | /** Library provenance, rendered once per page instead of once per selection. */ |
| 8 | export function RatatuiProjectLinks({ revision, copy }: { revision: string; copy: RatatuiCopy }) { |
| 9 | return ( |
| 10 | <aside className="rat-project" aria-label={copy.projectStatus}> |
| 11 | <h2>{copy.projectStatus}</h2> |
| 12 | <div className="rat-project-links"> |
| 13 | <a href={`${REPOSITORY}/commit/${revision}`}>{copy.sourceRevision}<code>{revision.slice(0, 7)}</code></a> |
| 14 | <a href={`${REPOSITORY}/actions/workflows/ci.yml?query=branch%3Amain`}>{copy.buildChecks}<Icon name="external" /></a> |
| 15 | <a href={`${REPOSITORY}/actions/workflows/gallery.yml?query=branch%3Amain`}>{copy.galleryChecks}<Icon name="external" /></a> |
| 16 | <a href={`${REPOSITORY}/releases`}>{copy.releaseHistory}<Icon name="external" /></a> |
| 17 | </div> |
| 18 | </aside> |
| 19 | ); |
| 20 | } |
| 21 |