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:
committed by
GitHub
parent
7774ef68a2
commit
a95972f808
@ -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));
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user