From c07987b2a97ce7d474e3f2cf5d25a9ce7f77b899 Mon Sep 17 00:00:00 2001 From: yndx-madfriend <99418743+yndx-madfriend@users.noreply.github.com> Date: Mon, 21 Aug 2023 14:20:49 +0300 Subject: [PATCH] Persona: remove direct lodash import (#916) --- src/components/Persona/utils.ts | 4 ++-- src/components/Select/__tests__/utils.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Persona/utils.ts b/src/components/Persona/utils.ts index 0fed4758e6..68c17dcc44 100644 --- a/src/components/Persona/utils.ts +++ b/src/components/Persona/utils.ts @@ -1,4 +1,4 @@ -import _ from 'lodash'; +import get from 'lodash/get'; import type {PersonaText} from './types'; @@ -20,5 +20,5 @@ export const extractTextView = (text: PersonaText = '') => { export function getTwoLetters(text: string) { const words = text.split(' '); - return [_.get(words, '[0][0]'), _.get(words, '[1][0]')].filter(Boolean).join(''); + return [get(words, '[0][0]'), get(words, '[1][0]')].filter(Boolean).join(''); } diff --git a/src/components/Select/__tests__/utils.tsx b/src/components/Select/__tests__/utils.tsx index aeded7b9fd..6bbcd9c9dc 100644 --- a/src/components/Select/__tests__/utils.tsx +++ b/src/components/Select/__tests__/utils.tsx @@ -1,7 +1,7 @@ import React from 'react'; import {act, render} from '@testing-library/react'; -import {range} from 'lodash'; +import range from 'lodash/range'; import {Select} from '..'; import type {SelectOption, SelectOptionGroup, SelectProps} from '..';