feat(card): exact view count on hover (disambiguate 9B vs 98)
The abbreviated count (e.g. '9B' for ~9 billion) can read like '98' since the B glyph resembles an 8. Add a title tooltip with the full localized count on the views label.
This commit is contained in:
parent
ab439f9717
commit
48e7f8d11e
1 changed files with 4 additions and 1 deletions
|
|
@ -233,7 +233,10 @@ function VideoCard({
|
||||||
<>
|
<>
|
||||||
{video.view_count != null && (
|
{video.view_count != null && (
|
||||||
<>
|
<>
|
||||||
{formatViews(video.view_count)} {t("card.views")} ·{" "}
|
<span title={`${video.view_count.toLocaleString()} ${t("card.views")}`}>
|
||||||
|
{formatViews(video.view_count)} {t("card.views")}
|
||||||
|
</span>{" "}
|
||||||
|
·{" "}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{relativeTime(video.published_at)}
|
{relativeTime(video.published_at)}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue