fix: use lodash-es in the client (#41931)

This commit is contained in:
Oliver Eyton-Williams
2021-04-28 23:11:20 +02:00
committed by GitHub
parent db369fbed1
commit 9be2fb9a10
37 changed files with 95 additions and 43 deletions

View File

@@ -1,5 +1,5 @@
import React from 'react';
import { kebabCase } from 'lodash';
import { kebabCase } from 'lodash-es';
import normalizeUrl from 'normalize-url';
import PropTypes from 'prop-types';
import {

View File

@@ -1,6 +1,6 @@
import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import { curry } from 'lodash';
import { curry } from 'lodash-es';
import { createSelector } from 'reselect';
import { connect } from 'react-redux';
import { Row, Col } from '@freecodecamp/react-bootstrap';

View File

@@ -1,6 +1,6 @@
import React, { Component, useMemo } from 'react';
import PropTypes from 'prop-types';
import { reverse, sortBy } from 'lodash';
import { reverse, sortBy } from 'lodash-es';
import {
Button,
Modal,

View File

@@ -5,7 +5,7 @@ import { bindActionCreators } from 'redux';
import { createSelector } from 'reselect';
import { SearchBox } from 'react-instantsearch-dom';
import { HotKeys, ObserveKeys } from 'react-hotkeys';
import { isEqual } from 'lodash';
import { isEqual } from 'lodash-es';
import { withTranslation } from 'react-i18next';
import { searchPageUrl } from '../../../utils/algolia-locale-setup';

View File

@@ -1,7 +1,7 @@
import React, { useEffect } from 'react';
import PropTypes from 'prop-types';
import { connectStateResults, connectHits } from 'react-instantsearch-dom';
import isEmpty from 'lodash/isEmpty';
import { isEmpty } from 'lodash-es';
import { useTranslation } from 'react-i18next';
import { searchPageUrl } from '../../../utils/algolia-locale-setup';

View File

@@ -5,7 +5,7 @@ import {
connectStateResults,
connectAutoComplete
} from 'react-instantsearch-dom';
import { isEmpty } from 'lodash';
import { isEmpty } from 'lodash-es';
import EmptySearch from './EmptySearch';
import NoResults from './NoResults';

View File

@@ -2,7 +2,7 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { find, first, values, isString } from 'lodash';
import { find, first, values, isString } from 'lodash-es';
import {
Table,
Button,

View File

@@ -8,7 +8,7 @@ import {
FormControl,
HelpBlock
} from '@freecodecamp/react-bootstrap';
import { findIndex, find, isEqual } from 'lodash';
import { findIndex, find, isEqual } from 'lodash-es';
import isURL from 'validator/lib/isURL';
import { withTranslation } from 'react-i18next';