| 1 | import { GitFork, Star, Users } from "lucide-react"; |
| 2 | import Link from "next/link |
| 3 | |
| 4 | /** Description and the counts that have a page of their own behind them. */ |
| 5 | export function RepositoryAbout({ |
| 6 | username, |
| 7 | slug, |
| 8 | description, |
| 9 | starCount, |
| 10 | forkCount, |
| 11 | }: { |
| 12 | username: string |
| 13 | slug: string |
| 14 | description?: string |
| 15 | starCount: number |
| 16 | forkCount: number |
| 17 | }) { |
| 18 | const base = |
| 19 | |
| 20 | return ( |
| 21 | <div className="flex flex-col gap-3 |
| 22 | <h2 className="text-sm font-semibold |
| 23 | |
| 24 | <p className="text-sm text-muted-foreground |
| 25 | {description || "No description provided. |
| 26 | </p> |
| 27 | |
| 28 | <div className="flex flex-col gap-2 text-sm |
| 29 | <Link |
| 30 | href={`${base |
| 31 | className="flex items-center gap-2 text-muted-foreground hover:text-foreground" |
| 32 | > |
| 33 | <Star className=" |
| 34 | <span className="font-medium text-foreground tabular-nums |
| 35 | {starCount} |
| 36 | </span> |
| 37 | {starCount === 1 |
| 38 | </Link> |
| 39 | |
| 40 | <Link |
| 41 | href={`${base |
| 42 | className="flex items-center gap-2 text-muted-foreground hover:text-foreground" |
| 43 | > |
| 44 | <GitFork className=" |
| 45 | <span className="font-medium text-foreground tabular-nums |
| 46 | {forkCount} |
| 47 | </span> |
| 48 | {forkCount === 1 |
| 49 | </Link> |
| 50 | |
| 51 | <Link |
| 52 | href={`${base |
| 53 | className="flex items-center gap-2 text-muted-foreground hover:text-foreground" |
| 54 | > |
| 55 | <Users className=" |
| 56 | Contributors |
| 57 | </Link> |
| 58 | </div> |
| 59 | </div> |
| 60 | ); |
| 61 | } |