UNPKG

@hhgtech/hhg-components

Version:
17 lines (16 loc) 657 B
import { Dispatch } from 'react'; import { LocaleType, GPSType } from "../../../../interfaces/types"; import { Action, ReducerState } from "./reducer"; type UseSearchBarApiParams = { dispatch: Dispatch<Action>; careApiDomain: string; locale?: LocaleType; }; export default function useSearchBarApi({ dispatch, careApiDomain, locale, }: UseSearchBarApiParams): { fetchCitiesByLocation: ({ coordinates }: { coordinates?: GPSType; }) => Promise<void>; fetchCitiesByKeyword: (keyword: string) => Promise<void>; fetchSearchResults: (searchKeywords: string, state: ReducerState) => Promise<void>; }; export {};