mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-14 17:54:42 +00:00
25 lines
815 B
TypeScript
25 lines
815 B
TypeScript
import SidebarCard from '../shared/SidebarCard';
|
|
|
|
interface CommunityStatsCardProps {
|
|
likeCount: number;
|
|
ratingsCount: number;
|
|
commentCount: number;
|
|
}
|
|
|
|
const StatRow = ({ label, value }: { label: string; value: number }) => (
|
|
<div className="flex items-center justify-between gap-2 text-sm">
|
|
<span className="text-base-content/70">{label}</span>
|
|
<span className="font-semibold tabular-nums">{value}</span>
|
|
</div>
|
|
);
|
|
|
|
const CommunityStatsCard = ({ likeCount, ratingsCount, commentCount }: CommunityStatsCardProps) => (
|
|
<SidebarCard title="Community">
|
|
<StatRow label="Likes" value={likeCount} />
|
|
<StatRow label="Ratings" value={ratingsCount} />
|
|
<StatRow label="Comments" value={commentCount} />
|
|
</SidebarCard>
|
|
);
|
|
|
|
export default CommunityStatsCard;
|