1
0
Fork 0

Revert "chore: use Babel to replace DocSearch verison in UA"

This reverts commit 012be698540926df5a2ba11ee9c52cedcf00e3d7.
This commit is contained in:
François Chalifour 2020-04-24 16:20:44 +02:00
parent 9dea2001c3
commit 464ad8f06d
2 changed files with 4 additions and 1 deletions

View file

@ -1,10 +1,12 @@
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]);

1
src/version.ts Normal file
View file

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