From 5d9df5bfd40cb45bc3ca38aa1d328a2b0eab6893 Mon Sep 17 00:00:00 2001 From: Paul Wackerow <54227730+wackerow@users.noreply.github.com> Date: Tue, 29 Nov 2022 18:20:40 -0800 Subject: [PATCH] extract keys to .env --- src/components/UI/Search.tsx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/components/UI/Search.tsx b/src/components/UI/Search.tsx index 0eb58ec8e6..3417d42285 100644 --- a/src/components/UI/Search.tsx +++ b/src/components/UI/Search.tsx @@ -2,10 +2,14 @@ import { DocSearch } from '@docsearch/react'; 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 ( + + ); +}