diff --git a/index.html b/index.html index f8455652f..435938545 100644 --- a/index.html +++ b/index.html @@ -26,8 +26,16 @@
- + + \ No newline at end of file diff --git a/source/components/CurrencyInput/CurrencyInput.js b/source/components/CurrencyInput/CurrencyInput.js index 2b48f7e11..48116e2a1 100644 --- a/source/components/CurrencyInput/CurrencyInput.js +++ b/source/components/CurrencyInput/CurrencyInput.js @@ -1,6 +1,7 @@ import classnames from 'classnames' import { dissoc } from 'ramda' import React, { Component } from 'react' +import { isIE } from '../../utils' import './CurrencyInput.css' let isCurrencyPrefixed = language => @@ -11,16 +12,6 @@ let isCurrencyPrefixed = language => .format(12) .match(/€.*12/) -function isIE() { - return ( - navigator.appName == 'Microsoft Internet Explorer' || - (navigator.appName == 'Netscape' && - new RegExp('Trident/.*rv:([0-9]{1,}[.0-9]{0,})').exec( - navigator.userAgent - ) != null) - ) -} - class CurrencyInput extends Component { state = { value: '' diff --git a/source/components/Distribution.js b/source/components/Distribution.js index cc65e9282..4d2fbd132 100644 --- a/source/components/Distribution.js +++ b/source/components/Distribution.js @@ -4,6 +4,8 @@ import Observer from '@researchgate/react-intersection-observer' import withColours from 'Components/utils/withColours' import React, { Component } from 'react' import emoji from 'react-easy-emoji' +import { isIE } from '../utils' + import { Trans } from 'react-i18next' import { connect } from 'react-redux' import { config, Spring } from 'react-spring' @@ -157,11 +159,14 @@ let ChartItemBar = ({ styles, colour, montant, total }) => (
-
+
{}), // eslint-disable-line no-console connectToHistory: history => history } const TrackerContext = createContext(defaultTracker) diff --git a/source/i18n.js b/source/i18n.js index 9c2b0a07a..d0d8907c3 100644 --- a/source/i18n.js +++ b/source/i18n.js @@ -17,7 +17,6 @@ let lang = queryString.parse(location.search)['lang'] || parseDataAttributes(getFromSessionStorage('lang')) || 'fr' -console.log('i18n', lang) setToSessionStorage('lang', lang) i18next.init( @@ -31,7 +30,7 @@ i18next.init( } }, (err, t) => { - console.log('Error from i18n load', err, t) //eslint-disable-line no-console + console && console.error('Error from i18n load', err, t) //eslint-disable-line no-console } ) diff --git a/source/utils.js b/source/utils.js index a471c1151..c73ee9773 100644 --- a/source/utils.js +++ b/source/utils.js @@ -35,3 +35,13 @@ export function debounce( timeoutId = setTimeout(() => fn(...args), timeout) } } + +export function isIE() { + return ( + navigator.appName == 'Microsoft Internet Explorer' || + (navigator.appName == 'Netscape' && + new RegExp('Trident/.*rv:([0-9]{1,}[.0-9]{0,})').exec( + navigator.userAgent + ) != null) + ) +}