MCPcopy Create free account
hub / github.com/NiladriHazra/WhatToBuild / RepositoryTableRow

Function RepositoryTableRow

components/RepositoryTableRow.tsx:13–116  ·  view source on GitHub ↗
({ repo, onViewDetails }: RepositoryTableRowProps)

Source from the content-addressed store, hash-verified

11}
12
13export default function RepositoryTableRow({ repo, onViewDetails }: RepositoryTableRowProps) {
14 const router = useRouter();
15
16 return (
17 <tr className="hover:bg-black/40 transition-all duration-300 group border-b border-white/10 backdrop-blur-sm relative overflow-hidden animate-in fade-in slide-in-from-left-2">
18 {/* Subtle gradient overlay */}
19 <div className="absolute inset-0 bg-gradient-to-r from-indigo-500/5 via-transparent to-purple-500/5 opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none"></div>
20
21 <td className="py-4 px-6">
22 <div className="flex flex-col">
23 <h3
24 className="text-lg font-semibold text-white group-hover:text-indigo-300 transition-colors cursor-pointer hover:underline"
25 onClick={() => onViewDetails && onViewDetails(repo)}
26 >
27 {repo.full_name || repo.name}
28 </h3>
29 <p className="text-white/70 text-sm mt-1 line-clamp-2">
30 {repo.description ?
31 (repo.description.length > 120 ? `${repo.description.substring(0, 120)}...` : repo.description)
32 : 'No description available'
33 }
34 </p>
35 {repo.topics && repo.topics.length > 0 && (
36 <div className="flex flex-wrap gap-1 mt-2 max-w-full overflow-hidden">
37 {repo.topics.slice(0, 3).map((topic) => (
38 <span key={topic} className="bg-black/30 backdrop-blur-xl border border-white/20 text-white/80 px-2 py-0.5 rounded-full text-xs shadow-sm hover:bg-black/40 hover:border-white/30 transition-all duration-300 hover:scale-105">
39 {topic}
40 </span>
41 ))}
42 {repo.topics.length > 3 && (
43 <span className="text-white/50 text-xs px-2 py-0.5">
44 +{repo.topics.length - 3} more
45 </span>
46 )}
47 </div>
48 )}
49 </div>
50 </td>
51 <td className="py-4 px-4 hidden sm:table-cell">
52 <div className="flex items-center">
53 <span className="w-3 h-3 rounded-full bg-indigo-500 mr-2 shadow-sm shadow-indigo-500/30"></span>
54 <span className="text-white/80 text-sm">
55 {repo.language || 'Unknown'}
56 </span>
57 </div>
58 </td>
59 <td className="py-4 px-4 hidden sm:table-cell">
60 <div className="flex items-center text-yellow-400">
61 <Star className="w-4 h-4 mr-1 fill-current" />
62 <span className="text-white font-medium">
63 {repo.stargazers_count.toLocaleString()}
64 </span>
65 </div>
66 </td>
67 <td className="py-4 px-4 hidden md:table-cell">
68 {repo.relevance_score ? (
69 <div className="flex items-center">
70 <div className="w-16 bg-black/30 rounded-full h-2 mr-2 backdrop-blur-sm border border-white/10">

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected