From b86a2b8e69718366de1f38bc43d05357d7434fa9 Mon Sep 17 00:00:00 2001 From: Andrey Melikhov Date: Thu, 24 Oct 2024 15:35:40 +0300 Subject: [PATCH] fix: refactoring lodash imports for the better tree shaking --- playwright/core/expectScreenshotFixture.ts | 2 +- src/navigation/hooks/useShowBorder.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/playwright/core/expectScreenshotFixture.ts b/playwright/core/expectScreenshotFixture.ts index 320ea9b30..56f419a97 100644 --- a/playwright/core/expectScreenshotFixture.ts +++ b/playwright/core/expectScreenshotFixture.ts @@ -1,6 +1,6 @@ import {expect} from '@playwright/experimental-ct-react'; import type {JSHandle, Locator, PageScreenshotOptions} from '@playwright/test'; -import {isFunction} from 'lodash'; +import isFunction from 'lodash/isFunction'; import {DEFAULT_MOUNT_TEST_DELAY} from './constants'; import type {PlaywrightFixture} from './types'; diff --git a/src/navigation/hooks/useShowBorder.ts b/src/navigation/hooks/useShowBorder.ts index 39d11361e..4b116cd10 100644 --- a/src/navigation/hooks/useShowBorder.ts +++ b/src/navigation/hooks/useShowBorder.ts @@ -1,6 +1,6 @@ import {useEffect, useState} from 'react'; -import {debounce} from 'lodash'; +import debounce from 'lodash/debounce'; const useShowBorder = (withBorder: boolean, withBorderOnScroll: boolean) => { const [showBorder, setShowBorder] = useState(withBorder);