refactor(chore):3896-replace-lodash-debounce-to-useDebounce (#4814)

Close: #3896 

## PR Details

Changed `lodash.debounce` to `useDebounce`.

Co-authored-by: VoitovychDM <voitovych.dm.m@gmail.com>
This commit is contained in:
Dmitriy Voytovich
2024-04-05 19:07:44 +02:00
committed by GitHub
parent 7774ef68a2
commit a95972f808
6 changed files with 18 additions and 14 deletions

View File

@ -1,7 +1,7 @@
import { ReactNode, useState } from 'react';
import styled from '@emotion/styled';
import { AnimatePresence, LayoutGroup } from 'framer-motion';
import debounce from 'lodash.debounce';
import { useDebouncedCallback } from 'use-debounce';
import {
H1Title,
@ -78,7 +78,7 @@ export const ConfirmationModal = ({
isValueMatchingInput(confirmationValue, value);
};
const isValueMatchingInput = debounce(
const isValueMatchingInput = useDebouncedCallback(
(value?: string, inputValue?: string) => {
setIsValidValue(Boolean(value && inputValue && value === inputValue));
},