docs: fixes env variable name in next.js docs (#4665)

the SEARCH_INDEX_NAME variable should equal to  process.env.NEXT_PUBLIC_SEARCH_API_KEY  (as in the .env file) instead of NEXT_PUBLIC_INDEX_NAME.

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
This commit is contained in:
Minh Tu NgoandShahed Nasser authored and GitHub committed 2023-08-02 11:47:59 +03:00
1 parent 84fe2a3837
commit 7f1421c218
1 file changed
+1 -1
+1 -1
View File
@@ -274,7 +274,7 @@ const apiKey =
export const searchClient = algoliasearch(appId, apiKey) export const searchClient = algoliasearch(appId, apiKey)
export const SEARCH_INDEX_NAME = export const SEARCH_INDEX_NAME =
process.env.NEXT_PUBLIC_INDEX_NAME || "products" process.env.NEXT_PUBLIC_SEARCH_INDEX_NAME || "products"
``` ```
If you run your Next.js Starter Template now while the Medusa backend is running, the search functionality will be available in your storefront. If you run your Next.js Starter Template now while the Medusa backend is running, the search functionality will be available in your storefront.