Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
? autocompleteOptions.debug
: false;
// eslint-disable-next-line no-param-reassign
autocompleteOptions.debug = debug || autocompleteOptionsDebug;
this.autocompleteOptions = autocompleteOptions;
this.autocompleteOptions.cssClasses =
this.autocompleteOptions.cssClasses || {};
this.autocompleteOptions.cssClasses.prefix =
this.autocompleteOptions.cssClasses.prefix || 'ds';
// eslint-disable-next-line no-param-reassign
handleSelected = handleSelected || this.handleSelected;
this.isSimpleLayout = layout === 'simple';
this.client = algoliasearch(this.appId, this.apiKey);
this.client.addAlgoliaAgent(`docsearch.js ${version}`);
if (enhancedSearchInput) {
this.input = DocSearch.injectSearchBox(this.input);
}
this.autocomplete = autocomplete(this.input, autocompleteOptions, [
{
source: this.getAutocompleteSource(transformData, queryHook),
templates: {
suggestion: DocSearch.getSuggestionTemplate(this.isSimpleLayout),
footer: templates.footer,
empty: DocSearch.getEmptyTemplate(),
},
},
]);
data() {
return {
searchClient: algoliasearch(
'latency',
'6be0576ff61c053d5f9a3225e2a90f76'
),
};
},
methods: {
import { Component } from '@angular/core';
import algoliasearch from "algoliasearch/lite";
const searchClient = algoliasearch(
"B1G2GM9NG0",
"aadef574be1f9252bb48d4ea09b5cfe5"
);
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
config = {
indexName: 'demo_ecommerce',
searchClient,
routing: true
};
}
render = () => {
const searchClient = algoliasearch(
'XI77W278IB',
'cf3b496f36aefb12a0a875810c234554',
);
return (
<>
<content></content>
);
import qs from 'qs';
import React, { Component, Fragment } from 'react';
import algoliasearch from 'algoliasearch/lite';
import { InstantSearch, SearchBox, Configure } from 'react-instantsearch-dom';
import {
GoogleMapsLoader,
GeoSearch,
Control,
Marker,
} from 'react-instantsearch-dom-maps';
const searchClient = algoliasearch(
'latency',
'6be0576ff61c053d5f9a3225e2a90f76',
{
_useRequestCache: true,
}
);
const updateAfter = 700;
const searchStateToUrl = searchState =>
searchState ? `${window.location.pathname}?${qs.stringify(searchState)}` : '';
class App extends Component {
constructor() {
super();
this.state = {
data() {
return {
searchClient: algoliasearch(
'B1G2GM9NG0',
'aadef574be1f9252bb48d4ea09b5cfe5'
),
routing: {
router: historyRouter(),
stateMapping: {
stateToRoute(uiState) {
return {
query: uiState.query,
brands:
uiState.refinementList &&
uiState.refinementList.brand &&
uiState.refinementList.brand.join('~'),
page: uiState.page,
};
},
import algoliasearch from 'algoliasearch/lite'
import { history } from 'instantsearch.js/es/lib/routers'
import { simple } from 'instantsearch.js/es/lib/stateMappings'
import 'instantsearch.css/themes/algolia-min.css'
export default {
indexName: 'scoop_apps',
searchClient: algoliasearch('F8ONSWSRN9', '134a8d4dd5935708368241431ab745c3'),
routing: {
router: history(),
stateMapping: simple()
}
}
const searchClient = useMemo(() => algoliasearch(appId, searchKey), [
appId,
import React, { Component } from 'react';
import { storiesOf } from '@storybook/react';
import algoliasearch from 'algoliasearch/lite';
import { InstantSearch, SearchBox, Configure } from 'react-instantsearch-dom';
import { CustomHits } from './util';
const stories = storiesOf('RefreshCache', module);
const searchClient = algoliasearch(
'latency',
'6be0576ff61c053d5f9a3225e2a90f76'
);
class AppWithRefresh extends Component {
state = {
refresh: false,
};
refresh = () => {
this.setState({ refresh: true }, () => {
this.setState({ refresh: false });
});
};
render() {
SortBy,
Stats,
Pagination,
Panel,
ClearRefinements,
RatingMenu,
RangeInput,
Highlight,
Configure,
connectStateResults,
} from 'react-instantsearch-dom';
import algoliasearch from 'algoliasearch/lite';
import withURLSync from './URLSync';
import './App.css';
const searchClient = algoliasearch(
'latency',
'6be0576ff61c053d5f9a3225e2a90f76'
);
const App = props => (
<header>
<div>
</div></header>