|
|
|
|
@ -1,11 +1,15 @@ |
|
|
|
|
import type { FormEvent } from 'react' |
|
|
|
|
import { useCallback, useEffect } from 'react' |
|
|
|
|
import { useHistory } from 'react-router-dom' |
|
|
|
|
|
|
|
|
|
import { PAGES } from 'config' |
|
|
|
|
|
|
|
|
|
import { useToggle } from 'hooks' |
|
|
|
|
|
|
|
|
|
import { useExtendedSearchStore } from 'features/ExtendedSearchPage/store' |
|
|
|
|
|
|
|
|
|
export const useSearch = () => { |
|
|
|
|
const history = useHistory() |
|
|
|
|
const { |
|
|
|
|
isFetching, |
|
|
|
|
onQueryChange, |
|
|
|
|
@ -22,7 +26,8 @@ export const useSearch = () => { |
|
|
|
|
|
|
|
|
|
const onSubmit = useCallback((e: FormEvent<HTMLFormElement>) => { |
|
|
|
|
e.preventDefault() |
|
|
|
|
}, []) |
|
|
|
|
history.push(PAGES.extendedSearch) |
|
|
|
|
}, [history]) |
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
reset() |
|
|
|
|
|