Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React from 'react';
import PropTypes from 'prop-types';
import { createClassNames, translatable } from 'react-instantsearch-dom';
import GeoSearchContext from './GeoSearchContext';
import withGoogleMaps from './withGoogleMaps';
const cx = createClassNames('GeoSearch');
const RedoPropTypes = {
googleMapsInstance: PropTypes.object.isRequired,
translate: PropTypes.func.isRequired,
};
export const Redo = ({
googleMapsInstance,
translate,
hasMapMoveSinceLastRefine,
refineWithInstance,
}) => (
<div>
<button disabled="{!hasMapMoveSinceLastRefine}"> refineWithInstance(googleMapsInstance)}</button></div>
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { createClassNames } from 'react-instantsearch-dom';
import { LatLngPropType, BoundingBoxPropType } from './propTypes';
const cx = createClassNames('GeoSearch');
class GoogleMaps extends Component {
static propTypes = {
google: PropTypes.object.isRequired,
initialZoom: PropTypes.number.isRequired,
initialPosition: LatLngPropType.isRequired,
mapOptions: PropTypes.object.isRequired,
onChange: PropTypes.func.isRequired,
onIdle: PropTypes.func.isRequired,
shouldUpdate: PropTypes.func.isRequired,
boundingBox: BoundingBoxPropType,
boundingBoxPadding: PropTypes.number,
children: PropTypes.node,
};
static childContextTypes = {
import React from 'react';
import PropTypes from 'prop-types';
import { createClassNames, translatable } from 'react-instantsearch-dom';
import GeoSearchContext from './GeoSearchContext';
import withGoogleMaps from './withGoogleMaps';
const cx = createClassNames('GeoSearch');
const ControlPropTypes = {
googleMapsInstance: PropTypes.object.isRequired,
translate: PropTypes.func.isRequired,
};
export const Control = ({
googleMapsInstance,
translate,
isRefineOnMapMove,
hasMapMoveSinceLastRefine,
toggleRefineOnMapMove,
refineWithInstance,
}) => (
<div>
{isRefineOnMapMove || !hasMapMoveSinceLastRefine ? (
<label></label></div>