From 88fc10e89b5666d65a4ce85337fecb1c2deaf121 Mon Sep 17 00:00:00 2001 From: Paul Wackerow <54227730+wackerow@users.noreply.github.com> Date: Wed, 14 Dec 2022 10:08:16 -0800 Subject: [PATCH] extract indexDomain to env var --- src/components/UI/Search.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/UI/Search.tsx b/src/components/UI/Search.tsx index 5125d441b3..195f375d48 100644 --- a/src/components/UI/Search.tsx +++ b/src/components/UI/Search.tsx @@ -6,13 +6,12 @@ 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 || ''; - - // TODO: Replace Algolia test keys with above env vars when ready + const indexDomain = process.env.NEXT_PUBLIC_ALGOLIA_INDEX_DOMAIN || 'https://melodious-puffpuff-8e1109.netlify.app'; return ( items.map(item => ({ ...item, - url: item.url.replace('https://melodious-puffpuff-8e1109.netlify.app', ''), + url: item.url.replace(indexDomain, ''), })) } /> );