1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-08-13 12:43:59 +02:00

Rating on the discover page

This commit is contained in:
Kamran Ahmed
2024-08-26 21:22:57 +01:00
parent 9f14e83eb4
commit be7ea71390

View File

@@ -50,14 +50,14 @@ export function Rating(props: RatingProps) {
); );
})} })}
{(props.total || 0) > 0 && ( {(props.total || 0) > 0 && (
<span className="ml-1.5 text-xs font-medium text-gray-400"> <>
{decimalIfNeeded(Number(props.rating!))} <span className="ml-1.5 text-xs font-medium text-gray-400">
</span> {decimalIfNeeded(Number(props.rating!))}
)} </span>
{(props.total || 0) > 0 && ( <span className="ml-1 text-xs text-gray-400">
<span className="ml-1 text-xs text-gray-400"> ({Intl.NumberFormat('en-US').format(props.total!)})
({Intl.NumberFormat('en-US').format(props.total!)}) </span>
</span> </>
)} )}
</div> </div>
); );