fix: remove duplicate code in citizens page
This commit is contained in:
@@ -205,93 +205,4 @@ function CitizenCard({ citizen }: { citizen: PublicCitizenSummary }) {
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
<Link
|
||||
key={citizen.id}
|
||||
href={`/citizens/${citizen.public_slug}`}
|
||||
className="group"
|
||||
>
|
||||
<div className="bg-white/5 backdrop-blur-md rounded-2xl border border-white/10 p-6 hover:border-cyan-500/50 transition-all hover:bg-white/10">
|
||||
{/* Avatar & Name */}
|
||||
<div className="flex items-start gap-4 mb-4">
|
||||
<div className="w-16 h-16 rounded-xl bg-gradient-to-br from-cyan-500/30 to-purple-500/30 flex items-center justify-center text-3xl">
|
||||
{getAgentKindIcon(citizen.kind)}
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<h3 className="text-xl font-semibold text-white group-hover:text-cyan-400 transition-colors">
|
||||
{citizen.display_name}
|
||||
</h3>
|
||||
<p className="text-cyan-400 text-sm">
|
||||
{citizen.public_title || citizen.kind}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Tagline */}
|
||||
{citizen.public_tagline && (
|
||||
<p className="text-white/60 text-sm mb-4 line-clamp-2">
|
||||
"{citizen.public_tagline}"
|
||||
</p>
|
||||
)}
|
||||
|
||||
{/* District & Room */}
|
||||
<div className="flex items-center gap-4 text-white/40 text-xs mb-4">
|
||||
{citizen.public_district && (
|
||||
<span className="flex items-center gap-1">
|
||||
<span>📍</span> {citizen.public_district}
|
||||
</span>
|
||||
)}
|
||||
{citizen.public_primary_room_slug && (
|
||||
<span className="flex items-center gap-1">
|
||||
<span>🚪</span> #{citizen.public_primary_room_slug}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Skills */}
|
||||
{citizen.public_skills && citizen.public_skills.length > 0 && (
|
||||
<div className="flex flex-wrap gap-1">
|
||||
{citizen.public_skills.slice(0, 4).map((skill, index) => (
|
||||
<span
|
||||
key={index}
|
||||
className="px-2 py-0.5 bg-cyan-500/10 text-cyan-400 rounded text-xs"
|
||||
>
|
||||
{skill}
|
||||
</span>
|
||||
))}
|
||||
{citizen.public_skills.length > 4 && (
|
||||
<span className="px-2 py-0.5 text-white/30 text-xs">
|
||||
+{citizen.public_skills.length - 4}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Status */}
|
||||
<div className="mt-4 pt-4 border-t border-white/10 flex items-center justify-between">
|
||||
<span className={`flex items-center gap-1.5 text-xs ${
|
||||
citizen.status === 'online' ? 'text-green-400' : 'text-white/40'
|
||||
}`}>
|
||||
<span className={`w-2 h-2 rounded-full ${
|
||||
citizen.status === 'online' ? 'bg-green-500' : 'bg-white/30'
|
||||
}`} />
|
||||
{citizen.status}
|
||||
</span>
|
||||
<span className="text-cyan-400 text-sm group-hover:translate-x-1 transition-transform">
|
||||
View Profile →
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{citizens.length === 0 && (
|
||||
<div className="text-center py-12">
|
||||
<p className="text-white/40">No public citizens yet</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user