feat: relay reviews

This commit is contained in:
codytseng
2025-09-20 22:00:28 +08:00
parent fcb31d8052
commit 2439150c6e
40 changed files with 1206 additions and 207 deletions

View File

@@ -0,0 +1,19 @@
import { cn } from '@/lib/utils'
import { Star } from 'lucide-react'
import { useMemo } from 'react'
export default function Stars({ stars, className }: { stars: number; className?: string }) {
const roundedStars = useMemo(() => Math.round(stars), [stars])
return (
<div className={cn('flex items-center gap-1', className)}>
{Array.from({ length: 5 }).map((_, index) =>
index < roundedStars ? (
<Star key={index} className="size-4 text-foreground fill-foreground" />
) : (
<Star key={index} className="size-4 text-muted-foreground" />
)
)}
</div>
)
}