extract keys to .env
This commit is contained in:
parent
f1282fbe9d
commit
5d9df5bfd4
|
@ -2,10 +2,14 @@ import { DocSearch } from '@docsearch/react';
|
||||||
|
|
||||||
import '@docsearch/css';
|
import '@docsearch/css';
|
||||||
|
|
||||||
export const Search: React.FC = () => (
|
export const Search: React.FC = () => {
|
||||||
|
const appId = process.env.NEXT_PUBLIC_ALGOLIA_APP_ID || ''
|
||||||
|
const apiKey = process.env.NEXT_PUBLIC_ALGOLIA_SEARCH_API_KEY || ''
|
||||||
|
const indexName = process.env.NEXT_PUBLIC_ALGOLIA_BASE_SEARCH_INDEX_NAME || ''
|
||||||
|
return (
|
||||||
<DocSearch
|
<DocSearch
|
||||||
appId="R2IYF7ETH7"
|
appId={appId}
|
||||||
apiKey="599cec31baffa4868cae4e79f180729b"
|
apiKey={apiKey}
|
||||||
indexName="docsearch"
|
indexName={indexName} />
|
||||||
/>
|
);
|
||||||
)
|
}
|
||||||
|
|
Loading…
Reference in New Issue