lbry-desktop/ui/component/fileViewCountInline/index.js
infinite-persistence f251ad999e
Handle view_count formatting on old browsers
## Issue
7102 Failed to initialize numberformat on some browsers

## Changes
Just revert to the non-SI notation (but still locale aware) for browsers that does not support the `compactDisplay` option.

I thought of adding an English-only abbreviation for that corner-case, but I think it's not worth the effort maintaining. There are worse issues happening on older browsers, such as icons not aligning properly in buttons and functions that require polyfilling.
2021-09-16 17:11:09 +08:00

15 lines
505 B
JavaScript

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),
};
};
export default connect(select, null)(FileViewCountInline);