From d1c74ec99764a3e9c1cc40a0fb25ae07b54bcd19 Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Wed, 15 Sep 2021 23:29:52 +0800 Subject: [PATCH] Revert "Use SI notation for view_count ... bbcdcfe4" It is breaking in old Safari 10. Revert for until; will get to a cleaner solution later. --- ui/component/fileViewCountInline/index.js | 2 -- ui/component/fileViewCountInline/view.jsx | 8 ++------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/ui/component/fileViewCountInline/index.js b/ui/component/fileViewCountInline/index.js index 4481f9eed..7bd072e79 100644 --- a/ui/component/fileViewCountInline/index.js +++ b/ui/component/fileViewCountInline/index.js @@ -1,14 +1,12 @@ import { connect } from 'react-redux'; import { makeSelectClaimForUri } from 'lbry-redux'; import { makeSelectViewCountForUri } from 'lbryinc'; -import { selectLanguage } from 'redux/selectors/settings'; import FileViewCountInline from './view'; const select = (state, props) => { return { claim: makeSelectClaimForUri(props.uri)(state), viewCount: makeSelectViewCountForUri(props.uri)(state), - lang: selectLanguage(state), }; }; diff --git a/ui/component/fileViewCountInline/view.jsx b/ui/component/fileViewCountInline/view.jsx index 811e08933..78b49334f 100644 --- a/ui/component/fileViewCountInline/view.jsx +++ b/ui/component/fileViewCountInline/view.jsx @@ -7,15 +7,11 @@ type Props = { // --- select --- claim: ?StreamClaim, viewCount: string, - lang: ?string, }; export default function FileViewCountInline(props: Props) { - const { isLivestream, claim, viewCount, lang } = props; - const formattedViewCount = Number(viewCount).toLocaleString(lang || 'en', { - compactDisplay: 'short', - notation: 'compact', - }); + const { isLivestream, claim, viewCount } = props; + const formattedViewCount = Number(viewCount).toLocaleString(); if (!viewCount || (claim && claim.repost_url) || isLivestream) { // (1) Currently, makeSelectViewCountForUri doesn't differentiate between