From cb417aa183a22a686ed4c466ad4a9a8c5dcad93b Mon Sep 17 00:00:00 2001 From: Nicholas Cunningham Date: Thu, 23 May 2024 14:57:13 -0600 Subject: [PATCH] feat(nx-dev): Add canary index and env file --- nx-dev/feature-search/src/lib/algolia-search.tsx | 12 ++++++------ nx-dev/nx-dev/.env.local | 3 +++ 2 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 nx-dev/nx-dev/.env.local diff --git a/nx-dev/feature-search/src/lib/algolia-search.tsx b/nx-dev/feature-search/src/lib/algolia-search.tsx index e98589900f463..c3bb3edea32e6 100644 --- a/nx-dev/feature-search/src/lib/algolia-search.tsx +++ b/nx-dev/feature-search/src/lib/algolia-search.tsx @@ -83,15 +83,15 @@ export function AlgoliaSearch({ type="button" ref={searchButtonRef} onClick={handleOpen} - className="flex w-full items-center rounded-md bg-white py-1.5 px-2 text-sm leading-4 ring-1 ring-slate-300 transition dark:bg-slate-700 dark:ring-slate-900" + className="flex w-full items-center rounded-md bg-white px-2 py-1.5 text-sm leading-4 ring-1 ring-slate-300 transition dark:bg-slate-700 dark:ring-slate-900" > - + Search Press @@ -140,9 +140,9 @@ export function AlgoliaSearch({ placeholder="Search the docs" initialScrollY={window.scrollY} onClose={handleClose} - indexName="nx-production" - apiKey="f49a1eb671385f0472a7285556168930" - appId="PCTGM1JTQL" + indexName={`${process.env.NEXT_PUBLIC_SEARCH_INDEX}`} + apiKey={`${process.env.NEXT_PUBLIC_SEARCH_API_KEY}`} + appId={`${process.env.NEXT_PUBLIC_SEARCH_APP_ID}`} navigator={{ navigate({ itemUrl }) { setIsOpen(false); diff --git a/nx-dev/nx-dev/.env.local b/nx-dev/nx-dev/.env.local new file mode 100644 index 0000000000000..bdf6b443a44a1 --- /dev/null +++ b/nx-dev/nx-dev/.env.local @@ -0,0 +1,3 @@ +NEXT_PUBLIC_SEARCH_INDEX=nx-canary-production +NEXT_PUBLIC_SEARCH_API_KEY=07340b85db83fd49c1f904f883cc3ef8 +NEXT_PUBLIC_SEARCH_APP_ID=PCTGM1JTQL \ No newline at end of file