Skip to content

Commit

Permalink
fix: change lodash imports
Browse files Browse the repository at this point in the history
  • Loading branch information
szymonrybczak committed Sep 18, 2024
1 parent 024a2ec commit 0de8f42
Show file tree
Hide file tree
Showing 18 changed files with 20 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/components/ConnectionLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {isEmpty} from 'lodash';
import isEmpty from 'lodash/isEmpty';
import React, {useMemo} from 'react';
import type {StyleProp, TextStyle, ViewStyle} from 'react-native';
import {View} from 'react-native';
Expand Down
2 changes: 1 addition & 1 deletion src/components/ErrorMessageRow.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {mapValues} from 'lodash';
import mapValues from 'lodash/mapValues';
import React from 'react';
import type {StyleProp, ViewStyle} from 'react-native';
import type * as OnyxCommon from '@src/types/onyx/OnyxCommon';
Expand Down
2 changes: 1 addition & 1 deletion src/components/SelectionScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {isEmpty} from 'lodash';
import isEmpty from 'lodash/isEmpty';
import React from 'react';
import type {StyleProp, ViewStyle} from 'react-native';
import useLocalize from '@hooks/useLocalize';
Expand Down
2 changes: 1 addition & 1 deletion src/components/VideoPlayer/BaseVideoPlayer.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable no-underscore-dangle */
import type {AVPlaybackStatus, VideoFullscreenUpdateEvent} from 'expo-av';
import {ResizeMode, Video, VideoFullscreenUpdate} from 'expo-av';
import {debounce} from 'lodash';
import debounce from 'lodash/debounce';
import type {MutableRefObject} from 'react';
import React, {useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState} from 'react';
import type {GestureResponderEvent} from 'react-native';
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useFetchRoute.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {isEqual} from 'lodash';
import isEqual from 'lodash/isEqual';
import {useEffect} from 'react';
import type {OnyxEntry} from 'react-native-onyx';
import * as IOUUtils from '@libs/IOUUtils';
Expand Down
2 changes: 1 addition & 1 deletion src/languages/en.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {CONST as COMMON_CONST, Str} from 'expensify-common';
import {startCase} from 'lodash';
import startCase from 'lodash/startCase';
import CONST from '@src/CONST';
import type {Country} from '@src/CONST';
import type {ConnectionName, PolicyConnectionSyncStage, SageIntacctMappingName} from '@src/types/onyx/Policy';
Expand Down
2 changes: 1 addition & 1 deletion src/libs/Navigation/dismissModalWithReport.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {getActionFromState} from '@react-navigation/core';
import type {NavigationContainerRef} from '@react-navigation/native';
import {StackActions} from '@react-navigation/native';
import {findLastIndex} from 'lodash';
import findLastIndex from 'lodash/findLastIndex';
import type {OnyxEntry} from 'react-native-onyx';
import Log from '@libs/Log';
import {isCentralPaneName} from '@libs/NavigationUtils';
Expand Down
2 changes: 1 addition & 1 deletion src/libs/Navigation/linkTo/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {getActionFromState} from '@react-navigation/core';
import type {NavigationContainerRef, NavigationState, PartialState} from '@react-navigation/native';
import {findFocusedRoute} from '@react-navigation/native';
import {omitBy} from 'lodash';
import omitBy from 'lodash/omitBy';
import getIsNarrowLayout from '@libs/getIsNarrowLayout';
import isReportOpenInRHP from '@libs/Navigation/isReportOpenInRHP';
import {isCentralPaneName} from '@libs/NavigationUtils';
Expand Down
2 changes: 1 addition & 1 deletion src/libs/NetworkConnection.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import NetInfo from '@react-native-community/netinfo';
import {isBoolean} from 'lodash';
import isBoolean from 'lodash/isBoolean';
import throttle from 'lodash/throttle';
import Onyx from 'react-native-onyx';
import type {ValueOf} from 'type-fest';
Expand Down
3 changes: 2 additions & 1 deletion src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {format} from 'date-fns';
import {Str} from 'expensify-common';
import {isEmpty, isNumber} from 'lodash';
import isNumber from 'lodash/isNumber';
import isEmpty from 'lodash/isEmpty';
import lodashEscape from 'lodash/escape';
import lodashFindLastIndex from 'lodash/findLastIndex';
import lodashIntersection from 'lodash/intersection';
Expand Down
2 changes: 1 addition & 1 deletion src/libs/actions/Policy/Policy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {PUBLIC_DOMAINS, Str} from 'expensify-common';
import {escapeRegExp} from 'lodash';
import lodashClone from 'lodash/clone';
import escapeRegExp from 'lodash/escapeRegExp';
import lodashUnion from 'lodash/union';
import type {NullishDeep, OnyxCollection, OnyxEntry, OnyxUpdate} from 'react-native-onyx';
import Onyx from 'react-native-onyx';
Expand Down
2 changes: 1 addition & 1 deletion src/libs/actions/Transaction.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {getUnixTime} from 'date-fns';
import {isEqual} from 'lodash';
import lodashClone from 'lodash/clone';
import lodashHas from 'lodash/has';
import isEqual from 'lodash/isEqual';
import type {OnyxCollection, OnyxEntry, OnyxUpdate} from 'react-native-onyx';
import Onyx from 'react-native-onyx';
import * as API from '@libs/API';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/report/comment/TextCommentFragment.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Str} from 'expensify-common';
import {isEmpty} from 'lodash';
import isEmpty from 'lodash/isEmpty';
import React, {memo, useEffect} from 'react';
import type {StyleProp, TextStyle} from 'react-native';
import Text from '@components/Text';
Expand Down
3 changes: 2 additions & 1 deletion src/pages/iou/request/step/IOURequestStepDistance.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {isEmpty, isEqual} from 'lodash';
import isEmpty from 'lodash/isEmpty';
import isEqual from 'lodash/isEqual';
import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react';
import {View} from 'react-native';
// eslint-disable-next-line no-restricted-imports
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {isEmpty} from 'lodash';
import isEmpty from 'lodash/isEmpty';
import React, {useCallback, useMemo} from 'react';
import {View} from 'react-native';
import RadioListItem from '@components/SelectionList/RadioListItem';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {isEmpty} from 'lodash';
import isEmpty from 'lodash/isEmpty';
import React, {useCallback, useMemo} from 'react';
import {View} from 'react-native';
import RadioListItem from '@components/SelectionList/RadioListItem';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {isEmpty} from 'lodash';
import isEmpty from 'lodash/isEmpty';
import React, {useCallback, useMemo} from 'react';
import {View} from 'react-native';
import RadioListItem from '@components/SelectionList/RadioListItem';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {isEmpty} from 'lodash';
import isEmpty from 'lodash/isEmpty';
import React, {useCallback, useMemo} from 'react';
import {View} from 'react-native';
import type {ValueOf} from 'type-fest';
Expand Down

0 comments on commit 0de8f42

Please sign in to comment.