Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(nx-dev): Add canary index #25982

Merged
merged 1 commit into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions nx-dev/feature-search/src/lib/algolia-search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
>
<MagnifyingGlassIcon className="h-4 w-4 flex-none" />
<span className="mx-3 inline-flex text-xs text-slate-300 dark:text-slate-400 md:text-sm">
<span className="mx-3 inline-flex text-xs text-slate-300 md:text-sm dark:text-slate-400">
Search
</span>
<span
style={{ opacity: browserDetected ? '1' : '0' }}
className="ml-auto hidden flex-none rounded-md border border-slate-200 bg-slate-50 px-1 py-0.5 text-xs font-semibold text-slate-500 dark:border-slate-700 dark:bg-slate-800/60 md:block"
className="ml-auto hidden flex-none rounded-md border border-slate-200 bg-slate-50 px-1 py-0.5 text-xs font-semibold text-slate-500 md:block dark:border-slate-700 dark:bg-slate-800/60"
>
<span className="sr-only">Press </span>
<kbd className="font-sans">
Expand Down Expand Up @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions nx-dev/nx-dev/.env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
NEXT_PUBLIC_SEARCH_INDEX=nx-canary-production
NEXT_PUBLIC_SEARCH_API_KEY=07340b85db83fd49c1f904f883cc3ef8
NEXT_PUBLIC_SEARCH_APP_ID=PCTGM1JTQL