extract keys to .env

This commit is contained in:
Paul Wackerow 2022-11-29 18:20:40 -08:00
parent f1282fbe9d
commit 5d9df5bfd4
No known key found for this signature in database
GPG Key ID: BB63E296FE9CAB8D
1 changed files with 11 additions and 7 deletions

View File

@ -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 = () => {
<DocSearch const appId = process.env.NEXT_PUBLIC_ALGOLIA_APP_ID || ''
appId="R2IYF7ETH7" const apiKey = process.env.NEXT_PUBLIC_ALGOLIA_SEARCH_API_KEY || ''
apiKey="599cec31baffa4868cae4e79f180729b" const indexName = process.env.NEXT_PUBLIC_ALGOLIA_BASE_SEARCH_INDEX_NAME || ''
indexName="docsearch" return (
/> <DocSearch
) appId={appId}
apiKey={apiKey}
indexName={indexName} />
);
}