1
0
Fork 0

chore: use Babel to replace DocSearch verison in UA

This commit is contained in:
François Chalifour 2020-04-24 16:00:04 +02:00
parent 07e606a00c
commit c44360258d
2 changed files with 1 additions and 4 deletions

View file

@ -1,12 +1,10 @@
import React from 'react';
import algoliasearch from 'algoliasearch/dist/algoliasearch-lite.esm.browser';
import { version } from './version';
export function useSearchClient(appId: string, apiKey: string) {
const searchClient = React.useMemo(() => {
const client = algoliasearch(appId, apiKey);
client.addAlgoliaAgent(`docsearch (${version})`);
client.addAlgoliaAgent(`docsearch (${__VERSION__})`);
return client;
}, [appId, apiKey]);

View file

@ -1 +0,0 @@
export const version = '1.0.0-alpha.10';