File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/components/repositories Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -12,8 +12,6 @@ import AwesomeDebouncePromise from 'awesome-debounce-promise';
12
12
13
13
import { repositorySearch } from '../..' ;
14
14
15
- const repositorySearchDebounced = AwesomeDebouncePromise ( repositorySearch , 250 ) ;
16
-
17
15
const useStyles = makeStyles ( theme => ( {
18
16
root : {
19
17
position : 'sticky' ,
@@ -41,6 +39,11 @@ function SearchForm({
41
39
const [ query , setQuery ] = useState ( defaultQuery ) ;
42
40
const [ initialSearch , setInitialSearch ] = useState ( false ) ;
43
41
42
+ const repositorySearchDebounced = AwesomeDebouncePromise (
43
+ async ( _props ) => { return await repositorySearch ( _props ) } ,
44
+ 250
45
+ ) ;
46
+
44
47
const updateRepositories = useCallback ( async ( owner , query ) => {
45
48
const repositories = await repositorySearchDebounced ( {
46
49
owner, query, config,
You can’t perform that action at this time.
0 commit comments