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.
This commit is contained in:
parent
91fbd615e2
commit
d1c74ec997
2 changed files with 2 additions and 8 deletions
|
@ -1,14 +1,12 @@
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { makeSelectClaimForUri } from 'lbry-redux';
|
import { makeSelectClaimForUri } from 'lbry-redux';
|
||||||
import { makeSelectViewCountForUri } from 'lbryinc';
|
import { makeSelectViewCountForUri } from 'lbryinc';
|
||||||
import { selectLanguage } from 'redux/selectors/settings';
|
|
||||||
import FileViewCountInline from './view';
|
import FileViewCountInline from './view';
|
||||||
|
|
||||||
const select = (state, props) => {
|
const select = (state, props) => {
|
||||||
return {
|
return {
|
||||||
claim: makeSelectClaimForUri(props.uri)(state),
|
claim: makeSelectClaimForUri(props.uri)(state),
|
||||||
viewCount: makeSelectViewCountForUri(props.uri)(state),
|
viewCount: makeSelectViewCountForUri(props.uri)(state),
|
||||||
lang: selectLanguage(state),
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -7,15 +7,11 @@ type Props = {
|
||||||
// --- select ---
|
// --- select ---
|
||||||
claim: ?StreamClaim,
|
claim: ?StreamClaim,
|
||||||
viewCount: string,
|
viewCount: string,
|
||||||
lang: ?string,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function FileViewCountInline(props: Props) {
|
export default function FileViewCountInline(props: Props) {
|
||||||
const { isLivestream, claim, viewCount, lang } = props;
|
const { isLivestream, claim, viewCount } = props;
|
||||||
const formattedViewCount = Number(viewCount).toLocaleString(lang || 'en', {
|
const formattedViewCount = Number(viewCount).toLocaleString();
|
||||||
compactDisplay: 'short',
|
|
||||||
notation: 'compact',
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!viewCount || (claim && claim.repost_url) || isLivestream) {
|
if (!viewCount || (claim && claim.repost_url) || isLivestream) {
|
||||||
// (1) Currently, makeSelectViewCountForUri doesn't differentiate between
|
// (1) Currently, makeSelectViewCountForUri doesn't differentiate between
|
||||||
|
|
Loading…
Reference in a new issue