File size: 653 Bytes
1e92f2d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | import React from 'react';
type GeoSearchContextState = {
isRefineOnMapMove: boolean;
hasMapMoveSinceLastRefine: boolean;
toggleRefineOnMapMove: () => void;
setMapMoveSinceLastRefine: (value: boolean) => void;
refineWithInstance: (value: google.maps.Map) => void;
};
const GeoSearchContext = React.createContext<GeoSearchContextState>({
// The actual default value comes from the prop of the component
// wrapping the `Provider`.
isRefineOnMapMove: true,
hasMapMoveSinceLastRefine: false,
toggleRefineOnMapMove: () => {},
setMapMoveSinceLastRefine: () => {},
refineWithInstance: () => {},
});
export default GeoSearchContext;
|