Skip to content

Commit

Permalink
reduced loadash size
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshu-wedensday committed Apr 9, 2024
1 parent 2229737 commit 6dba9cf
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/components/molecules/CharacterWithQuote/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import styled from 'styled-components/native';
import { get } from 'lodash';
import get from 'lodash/get';
import PropTypes from 'prop-types';
import { fonts } from '@themes';
import T from '@atoms/T';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import React from 'react';
import { renderWithIntl } from '@utils/testUtils';
import { rerender } from '@testing-library/react-native';
import SimpsonsLoveWednesday from '../index';
import { set } from 'lodash';
import set from 'lodash/set';
describe('<SimpsonsLoveWednesday />', () => {
it('Should render and match the snapshot', () => {
const baseElement = renderWithIntl(<SimpsonsLoveWednesday />);
Expand Down
2 changes: 1 addition & 1 deletion app/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* script `extract-intl`, and must use CommonJS module syntax
* You CANNOT use import/export in this file.
*/
import { get } from 'lodash';
import get from 'lodash/get';
const addLocaleData = require('react-intl').addLocaleData; //eslint-disable-line

const enLocaleData = require('react-intl/locale-data/en');
Expand Down
2 changes: 1 addition & 1 deletion app/scenes/ExampleScreen/saga.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { put, call, takeLatest } from 'redux-saga/effects';
import { get } from 'lodash';
import get from 'lodash/get';
import { getUser } from '@app/services/UserService';
import { exampleScreenActions, exampleScreenTypes } from './reducer';

Expand Down
2 changes: 1 addition & 1 deletion app/scenes/RootScreen/reducer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createActions } from 'reduxsauce';
import { fromJS } from 'immutable';
import produce from 'immer';
import { get } from 'lodash';
import get from 'lodash/get';
export const {
Types: rootScreenTypes,
Creators: rootScreenActions
Expand Down
2 changes: 1 addition & 1 deletion app/scenes/RootScreen/tests/saga.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import NavigationService from 'app/services/NavigationService';
import { timeout } from 'app/utils/testUtils';
import rootScreenSaga, { startup } from '../saga';
import { rootScreenTypes } from '../reducer';
import { set } from 'lodash';
import set from 'lodash/set';
describe('Tests for RootScreen sagas', () => {
const setupTests = () => ({
generator: rootScreenSaga(),
Expand Down
2 changes: 1 addition & 1 deletion app/services/NavigationService.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NavigationActions, StackActions } from '@react-navigation/compat';
import { set } from 'lodash';
import set from 'lodash/set';

/**
* The navigation is implemented as a service so that it can be used outside of components, for example in sagas.
Expand Down
5 changes: 4 additions & 1 deletion app/utils/apiUtils.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { create } from 'apisauce';
import mapKeysDeep from 'map-keys-deep';
import { camelCase, snakeCase, set, get } from 'lodash';
import camelCase from 'lodash/camelCase';
import snakeCase from 'lodash/snakeCase';
import set from 'lodash/set';
import get from 'lodash/get';
import { Config } from '@app/config/index';
export const apiClients = {
configApi: null,
Expand Down
2 changes: 1 addition & 1 deletion app/utils/testUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Provider } from 'react-redux';
import createStore from 'app/rootReducer';
import { DEFAULT_LOCALE, translationMessages } from '@app/i18n';
import ConnectedLanguageProvider from '@atoms/LanguageProvider';
import { get } from 'lodash';
import get from 'lodash/get';
export const apiResponseGenerator = (ok, data) => ({
ok,
data
Expand Down

0 comments on commit 6dba9cf

Please sign in to comment.