Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

Commit

Permalink
refactor(maps): update context props to TypeScript
Browse files Browse the repository at this point in the history
  • Loading branch information
francoischalifour committed Feb 13, 2019
1 parent 8206c2e commit 23f64ce
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 25 deletions.
14 changes: 0 additions & 14 deletions packages/react-instantsearch-dom-maps/src/GeoSearchContext.js

This file was deleted.

13 changes: 13 additions & 0 deletions packages/react-instantsearch-dom-maps/src/GeoSearchContext.ts
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 packages/react-instantsearch-dom-maps/src/GoogleMapsContext.js

This file was deleted.

10 changes: 10 additions & 0 deletions packages/react-instantsearch-dom-maps/src/GoogleMapsContext.ts
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;

0 comments on commit 23f64ce

Please sign in to comment.