Convert some instances (filter, find, pick) to native from lodash

This commit is contained in:
Qstick
2020-09-27 22:33:21 -04:00
parent 987ed357d5
commit d8a0aac9c3
21 changed files with 69 additions and 94 deletions

View File

@@ -1,4 +1,3 @@
import _ from 'lodash';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import VirtualTable from 'Components/Table/VirtualTable';
@@ -56,7 +55,7 @@ class ImportMovieTable extends Component {
id
} = prevItem;
const item = _.find(items, { id });
const item = items.find({ id });
if (!item) {
onRemoveSelectedStateItem(id);
@@ -67,7 +66,7 @@ class ImportMovieTable extends Component {
const isSelected = selectedState[id];
const isExistingMovie = !!selectedMovie &&
_.some(prevProps.allMovies, { tmdbId: selectedMovie.tmdbId });
prevProps.allMovies.some({ tmdbId: selectedMovie.tmdbId });
// Props doesn't have a selected movie or
// the selected movie is an existing movie.