This repository has been archived by the owner on Dec 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 386
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(maps): update context props to TypeScript
- Loading branch information
1 parent
8206c2e
commit 23f64ce
Showing
4 changed files
with
23 additions
and
25 deletions.
There are no files selected for viewing
14 changes: 0 additions & 14 deletions
14
packages/react-instantsearch-dom-maps/src/GeoSearchContext.js
This file was deleted.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
packages/react-instantsearch-dom-maps/src/GeoSearchContext.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React from 'react'; | ||
|
||
type GeoSearchContextProps = { | ||
isRefineOnMapMove: boolean; | ||
hasMapMoveSinceLastRefine: boolean; | ||
toggleRefineOnMapMove: () => void; | ||
setMapMoveSinceLastRefine: () => void; | ||
refineWithInstance: () => void; | ||
} | ||
|
||
const GeoSearchContext = React.createContext<Partial<GeoSearchContextProps>>({}); | ||
|
||
export default GeoSearchContext; |
11 changes: 0 additions & 11 deletions
11
packages/react-instantsearch-dom-maps/src/GoogleMapsContext.js
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
packages/react-instantsearch-dom-maps/src/GoogleMapsContext.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react'; | ||
|
||
export type GoogleMapsContextProps = { | ||
google: typeof google; | ||
instance: google.maps.Map; | ||
} | ||
|
||
const GoogleMapsContext = React.createContext<Partial<GoogleMapsContextProps>>({}); | ||
|
||
export default GoogleMapsContext; |